-
Notifications
You must be signed in to change notification settings - Fork 538
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
Allow user to set sharp's animated
option
#456
Comments
@sskylar Adding this to our backlog to evaluate. We will get back to you. Tks for the idea and details. |
We are encountering the same issue. We are utilizing the AUTO_WEBP feature and anticipate all images to be converted to WebP, including GIFs while preserving their animations. Sharp provides the capability to achieve this, but we lack the ability to use the animated flag, and it consistently remains false when using AUTO_WEBP due to the Content-Type check. This is occurring because The subsequent check for 'contentType' is nearly redundant, unless your intention is to receive GIF in output, but it's a rare case, because GIF is not an optimal choice.
It's possible that this check was initially designed to use the original image's Content-Type, and convert animated GIF to animated WEBP but it currently does not achieve that purpose. cc @simonkrol |
Fixed in v6.2.6 to allow the use of the filters:animated(true/false) tag for Thumbor style requests, or the animated: true/false edit for base 64 encoded requests. |
Right now sharp's
animated
option is turned on automatically if contentType is GIF:serverless-image-handler/source/image-handler/image-handler.ts
Line 78 in 1826412
This should be user customizable.
Use cases:
animated: false
)animated: true
)Animated WebP files are supported by sharp (example), but this setting is preventing it from working.
Solution:
animated
to their preference (true
orfalse
).The text was updated successfully, but these errors were encountered: