Support and document how to configure sharp to fail when loading corrupt images
See original GitHub issueCurrently, sharp
will only emit a warning for corrupt images. It’d be great to add an option to sharp to support rejecting the loading of these images.
See https://github.com/lovell/sharp/issues/607#issuecomment-298678935 and https://github.com/lovell/sharp/issues/607#issuecomment-298692269 for background.
(as always, thanks for Sharp! 👍
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Support and document how to configure sharp to fail when loading ...
Currently, sharp will only emit a warning for corrupt images. It'd be great to add an option to sharp to support rejecting the...
Read more >Sharp Copier Printer Image Memory Clear – Corrupt Print Job
Open your printers menu within the control panel in Windows, double click on the Sharp print driver, right click the print job and...
Read more >Processing images with sharp in Node.js - LogRocket Blog
In this tutorial, we'll analyze and modify an image using the sharp Node.js library. The only prerequisite for this tutorial is a system...
Read more >Read image and determine if its corrupt C# - Stack Overflow
Try to create a GDI+ Bitmap from the file. If creating the Bitmap object fails, then you could assume the image is corrupt....
Read more >Top 10 ways to repair & recover corrupt JPG files - YourStory
You make every effort to recover your valuable images. From broken header, abrupt power loss while transferring image files, virus infection to ...
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
sharp v0.19.0 now available, thanks for your work on this.
With 8.5 head I now see:
I’ll add a test to the new libvips test suite as well.
I think you could have got an error from libjpeg with
--fail
, but it would have been rather difficult.