PNG Input + withMetadata() + .webp() = Input file is missing or of an unsupported image format
See original GitHub issueHi!
I’m trying to convert a png file to webp but seems like when I add the withMetadata
to the mix I get the Input file is missing or of an unsupported image format
. Any idea why it happens?
To reproduce:
// use a PNG image
sharp(image)
.web()
.resize(100)
.withMetadata()
.toBuffer()
.then(...)
If I remove the withMetadata()
it works fine.
Worth mentioning that If I don’t call .resize
or any other operation… no error is raised but it output is a blank image.
PS: JPEG Images works fine.
PS: Tested on sharp 0.20.2
and 0.20.3
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Gatsby build always throwing Input file is missing or of an ...
It turns out I actually had a missing image file. I am using gatsby-plugin-manifest and the image path I have put there is...
Read more >Output options - High performance Node.js image processing
Write output image data to a file. If an explicit output format is not selected, it will be inferred from the extension, with...
Read more >sharp - npm
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images. Latest version: 0.31.0, ...
Read more >Bountysource
PNG Input + withMetadata() + .webp() = Input file is missing or of an unsupported image format.
Read more >Keyboard Control - mpv.io
It supports a wide variety of video file formats, audio and video codecs, ... (there is no LIRC support - configure remotes as...
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 FreeTop 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
Top GitHub Comments
This was due to a bug in libvips - see https://github.com/jcupitt/libvips/pull/989
I expect v0.21.0 of sharp to provide an updated version of libvips that will include this fix.
sharp v0.21.0 is now available with a prebuilt libvips v8.7.0 that contains the upstream fix.