-
Notifications
You must be signed in to change notification settings - Fork 105
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Input buffer contains unsupported image format #64
Comments
I do know sharp can't write gifs. It can however stream gifs through imagick and resize the first frame as .jpg or something else (lovell/sharp#165). But it can't write gifs. This means post move to sharp the supported image formats array has a bug in it: https://github.com/jimmynicol/image-resizer/blob/master/src/image.js#L62 I'm trying to find the time to do some modifications to fix this. I'm considering a few approaches:
I'll probably end up with 1 as I'm time poor at the moment. |
@saintberry I would probably suggest 1. is the most pragmatic choice too, but then it begs the question of why bother going through the resizer at all. The use cases I have had for this project rarely ended up needing gif support, and as mentioned resizing animated gifs never works well. The move to So I would probably prefer not supporting gifs at all, using the same CDN -> custom source setup to s3 for instance would provide just as good a solution as letting them pass through |
For anyone interested, we have decided to maintain our own fork: https://github.com/tripviss/image-resizer We've added a "normalize" step in tripviss/image-resizer#12 (Yes, the conversion to PNG has a performance hit, but that's the best we can do at the moment.) So you can now use GIF and TIFF as input, but be sure to specify a supported output format. Of course, GIF output is still not supported. |
I get this error when I try to resize a gif image, on heroku.
This seems to be related to sharp and libvips
lovell/sharp#162
The version used is later than the one they suggest.
I tried changing the .buildpack to get a newer libvips version but it still gave the same error.
Does anyone else have the same issue?
PS. Great work, extremely valuable project.
The text was updated successfully, but these errors were encountered: