Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxBufferSize is not enough #379

Open
melayyoub opened this issue Jan 15, 2023 · 0 comments
Open

MaxBufferSize is not enough #379

melayyoub opened this issue Jan 15, 2023 · 0 comments

Comments

@melayyoub
Copy link

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used patch-package to patch image-size@0.8.3 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/image-size/dist/index.js b/node_modules/image-size/dist/index.js
index c645177..67597ea 100644
--- a/node_modules/image-size/dist/index.js
+++ b/node_modules/image-size/dist/index.js
@@ -17,7 +17,7 @@ const detector_1 = require("./detector");
 require("./fs.promises");
 // Maximum buffer size, with a default of 512 kilobytes.
 // TO-DO: make this adaptive based on the initial signature of the image
-const MaxBufferSize = 512 * 1024;
+const MaxBufferSize = 128*1024 * 100;
 // This queue is for async `fs` operations, to avoid reaching file-descriptor limits
 const queue = new queue_1.default({ concurrency: 100, autostart: true });
 /**

This issue body was partially generated by patch-package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant