Image bigger (in bits) after sharp operation than the original
See original GitHub issueAfter using sharp like this with a jpg
await sharp(input).trim().toFile(output);
or
await sharp(input).resize({ width: 1000 }).toFile(output);
the output is bigger than the original picture original: 300 Kb trimed: 7 Mb resize: 7 Mb
Any advices ?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Image to composite must have same dimensions or smaller ...
The operation composite should allow greater images than the source image. It should use the source image dimensions.
Read more >Image resize results in massively larger file size than original ...
JPG images to a max width, but it's resulting in images being larger in kb than the source. What am I doing wrong?...
Read more >How to Resize an Image Correctly | The TechSmith Blog
Making an image to be larger than its original dimensions can be tricky. Resizing an image larger than its original dimensions can affect...
Read more >How To Process Images in Node.js With Sharp - DigitalOcean
Image compression is the process of reducing an image file size without losing quality. First, you'll chain the resize() method from the sharp ......
Read more >Processing images with sharp in Node.js - LogRocket Blog
To resize the image, we first chain the resize() function to the sharp instance. Then, we save it in the processed_images folder. This...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks, this input image is saved at a very low quality:
If you’d like a similar low quality for the output, you can set this via:
https://sharp.pixelplumbing.com/api-output#jpeg
Finally, to answer your next question before you’ve asked it, please see #908
nice anticipation 👍