nystudio107 / craft-imageoptimize

Automatically create & optimize responsive image transforms, using either native Craft transforms or a service like Imgix, with zero template changes.
https://nystudio107.com/plugins/imageoptimize
Other
235 stars 36 forks source link

[FR] Imgix animated gif support #172

Open louderthan10 opened 5 years ago

louderthan10 commented 5 years ago

Does ImageOptimize take advantage of Imgix's animated gif features? It's currently a "premium" feature (by premium, they say it may cost extra someday, but for now you just have to request it and they'll add it to your account).

Some differences from the horse's mouth:

The most important thing to do is use auto=format,compress for the animated GIFs. It will actually turn those GIFs into an animated WebP in supported browsers (such as Chrome).

Every other parameter is the same except for the quality parameter. Since GIFs operate in such a different way from images, we created a new parameter called gif-q. I would suggest gif-q=35 to gif-q=60. The higher the number, the more compression applied to the GIF.

Also, if you wanted to make a humongous change (but certainly require more front end work) you could convert the GIF to an MP4 and use some video tags to make it look like a GIF (<video preload="auto" autoplay="autoplay" muted="muted" loop="loop" style="width: 300px; height: 169px;">). You will see drastic performance changes using this option.

Here is a CodePen example of what I am talking about: https://codepen.io/daletom/pen/EQoazB

For more information regarding GIF parameters, you can read through our documentation below: https://docs.imgix.com/apis/url/animation

khalwat commented 5 years ago

It doesn't. Do you want it to? :)

louderthan10 commented 5 years ago

Yes please! Would love it too! 🙏🙏🙏

howells commented 4 years ago

I've just enabled GIFs for a site that uses Imgix and would love to use these params

sjcallender commented 4 years ago

Yes, please.

AdamChlan commented 3 years ago

We have a client site that needs this as well.

zizther commented 2 years ago

It would be great to have Imgix handle GIFs too.

In regards to GIF support in Imgix, I asked imgix to enable on my account, and they went ahead and did this, I do have a paid account with them though, not sure if that makes a difference.