Closed richardneililagan closed 2 years ago
I ran into this issue myself and ended up removing animated GIFs from my site for that reason. Curious to see if there's a way to process them while retaining the frames. I know Google provides a gif2webp
command-line utility (similar to cwebp
) that can be used to convert animated GIFs to animated WebPs. As a temporary workaround, you might be able to process those manually and passthrough-copy them to a dedicated folder for GIFs. Not ideal, though.
sharp
added support in 0.30.0 which will ship with Eleventy Image v1.1.0.
Tested here https://github.com/11ty/eleventy-img/blob/ca70384e26a8bab0ebe7de6f0184c244ff7f2ed1/test/test.js#L904
You will need to pass in the animated
prop to sharpOptions
When using a
.webp
or.gif
file that has video / animation frames as an input to the plugin, the output files seem to have stripped those out, and all we're left with are still images.In my case, my pipeline is something akin to this --- nothing special I think? :