-
Notifications
You must be signed in to change notification settings - Fork 384
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
Animated GIF Support for Storage Resize Images? #590
Comments
Do you mean animated GIFs? AFAIK, GIF files are supported, but they're converted to png files after they're resized. |
@rosariopfernandes Thank you for your response and the correction. Yes, animated GIFs :) In regard to the use case, we'll be providing a caching layer of sorts for images stored somewhere slow. As part of the service's goal to serve as highly optimized images as possible to the end-users' browsers, we're also aiming to provide these "cached" images in various sizes. A large portion of these images are animated GIFs. It is a tool geared towards developers. |
It seems like Sharp (the underlying library this extension uses) might support animated gifs (docs). The docs aren't totally clear though, as they say:
|
@firebase/invertase can you please try an animated gif with the above Sharp options in a Cloud Function and see if it works? If so, seems like an easy thing to support. If not, I don't think we can take this on. |
@jhuleatt My own interpretation of Sharp's documentation leads me to believe that animated GIF resizing will not work out-of-the-box and would require a node package to make the libvips binary available, or otherwise install libvips on the system. But I could be wrong, it's a little bit vague :) As an example, here is something that, at first/quick glance, seems similar what I am describing: https://github.com/lovell/sharp-libvips Also, thanks to everyone for taking the time to check into and discuss it 👏 🙏 |
As part of an investigation, we have attempted to create an example that could suit our needs. Using the following as a basic example... const sharp = require("sharp");
(async () => {
console.log("Starting >>>");
const buffer = await sharp("./test.gif", {
animated: true,
})
.resize(60)
.gif({
pageHeight: 60,
})
.toFile("resized.gif");
})(); Removing However, with This was tested on Perhaps waiting for the next iteration here lovell/sharp#2275 could be a potential solution |
Tried latest update (Mar 6th 2021) 0.1.19 and could NOT convert source GIF to thumbnail image and webp as a target image format for thumbs. Sadly did not work |
This is a feature I'm really looking forward to for my project |
[READ] Step 1: Are you in the right place?
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.
[REQUIRED] Step 2: Extension name
This feature request is for extension:
storage-resize-images
What feature would you like to see?
Animated GIF support
How would you use it?
Similar to how other formats are used.
The text was updated successfully, but these errors were encountered: