GIFs being transcoded to AVIF on Firefox and losing animation

The animated GIF on this blog post works fine in Chrome but fails to animate on Firefox.

We are using "compress,format" which I understand calls Imgix under the hood on the Prismic side of things.

What appears to be happening is that the file is transcoded to AVIF. Chrome supports animations in AVIF while Firefox currently doesn't.

So this appears to be a bug with content negotiation on the Prismic/Imgix side of things?

I can remove the format parameter, but this causes the GIF to come through at full size, which is 10x bigger than the AVIF version. That's okay as a workaround, but I was surprised the GIF was so big. Is it just passing through the Media library version untouched? Or is 10x bigger really the best a GIF compressed version can do?

Hello @matt4, thanks for reaching out.
We've seen this issue before. Lucie, from the DevX team posted an answer about an open issue on GitHub about this where she provided a few workarounds that you might find helpful, you can check it out here.

Thanks, I was doing something similar as a workaround and this confirmed it was the best approach until Firefox has animated AVIF support.

1 Like