VipsJpeg: Invalid SOS parameters for sequential JPEG / with sharp(imageBuffer, originalFileData, { failOnError: false })

See original GitHub issue

I am experiencing same error as described earlier: https://github.com/lovell/sharp/issues/1578 But I am using with image data from an S3 like storage as Buffer

Error on latest versions: sharp@0.28.2, sharp@0.28.3

This is how I use sharp, I added faileOnError: false according to #1578

sharp(imageBuffer, { failOnError: false })
        .rotate()
        .resize({
          width: dimension,
          height: dimension,
          fit: sharp.fit.cover,
          position: sharp.strategy.entropy,
        })
        .jpeg({ quality: 90, mozjpeg: true })
        .toBuffer()

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
lovellcommented, Jul 5, 2021

The use of failOnError: false normally allows these broken images to load (typically from Samsung devices, they are the worst offender for producing invalid JPEG images).

If you’re still having problems, please can you provide an example image that fails in this manner when using failOnError: false.

2reactions
lovellcommented, Dec 1, 2022

These images are not truncated so failOn: 'error' should work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid SOS parameters for sequential JPEG - Stack Overflow
I' am getting this error when use imagecreatefromjpeg function. Warning: imagecreatefromjpeg(): gd ...
Read more >
Missing file - no visible errors or rejections - Bug
... 'Error: VipsJpeg: Invalid SOS parameters for sequential JPEG', ... the missing file via adding failOnError: false to your sharp calls.
Read more >
Constructor - High performance Node.js image processing
Constructor factory to create an instance of sharp , to which further methods are chained. JPEG, PNG, WebP, GIF, AVIF or TIFF format...
Read more >
"Invalid SOS parameters for sequential JPEG" error
This is my command line that I'm trying to run: magick Selfie.jpg -resize 100x133 Images/Selfie.jpg. The JPG file was a photo taken by...
Read more >
Invalid SOS parameters for sequential JPEG - OutSystems
I believe that you are using the ImageToolbox, and this component uses the thirdparty tool "ImageMagick", can you check the usage of resize...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found