-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Sharp removes GIF animation #3625
Comments
Hmm... I ended up doing some exploring after posting this to see if I could find another library to handles GIFs in the meantime, but something referenced sharp and included a second argument to the sharp constructor, |
It looks like the
Please see #3610 for a previous related question and a possible suggestion to create a wrapper that brute forces its way through various configuration options to find the smallest output, as this is what GIF optimisation tools do. |
I hope this information helped. Please feel free to re-open with more details if further assistance is required. |
Possible bug
When passing a path to an animated GIF and using either
toFile(..)
ortoBuffer()
, the returned GIF has no animation. ThetoBuffer()
method is important to me as I need it to upload images to an image host.Is this a possible bug in a feature of sharp, unrelated to installation?
npm install sharp
completes without error.node -e "require('sharp')"
completes without error.If you cannot confirm both of these, please open an installation issue instead.
Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of
sharp
that is not the latest, please open an issue against that package instead.What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?What are the steps to reproduce?
The file, sample.gif, will not be animated. This also applies to the
toBuffer()
method but I'm unsure how best to showcase that.What is the expected behaviour?
The returned image/buffer should include the animation data. According to the
AnimationOptions
interface,loop
should default to0
(infinite). I'm unsure if that's even the issue as1
would at least show the other frames. All I'm getting is a static image.Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
Please provide sample image(s) that help explain this problem
some_animated_gif.zip or imgur link
The text was updated successfully, but these errors were encountered: