unjs / ipx

🖼️ High performance, secure and easy-to-use image optimizer.
MIT License
2.02k stars 66 forks source link

support animated gif/webp #35

Closed flapili closed 2 years ago

flapili commented 3 years ago

Hi, there is a way to support gifs format ?

as example https://flapili.fr/_ipx/author/mrsociety404.gif doesn't work while https://flapili.fr/author/mrsociety404.gif does

pi0 commented 3 years ago

Hi @flapili. Thanks for reporting the issue. Sharp seems to support animated output but it is not enabled by default. I've to check more but will be solved soon by either addition of new animated modifier or enabling (at least for gif) by default.

pi0 commented 3 years ago

Just added experimental support for animated modifier. It forces output to be webp because default build of libvps cannot output animated gif (https://github.com/lovell/sharp/pull/2012) Also as a currently, you cannot resize animated output (https://github.com/lovell/sharp/issues/2275)

Released in 0.6.2

pi0 commented 2 years ago

Let's track in #53 for later improvements.