Netlify Image CDN doesn't process animated GIF file

Hello!

I have converted a site from the old nf_resize query string approach to transform images to the new Image CDN with /.netlify/images?url=....

Previously, any transform on a GIF would return just the first frame. That may have been a limitation but I was using it as a feature to get a preview of a GIF on my site, without autoplay.

With this new approach, it seems animated transformed images are possible, if I am understanding the docs correctly, but I wanted to keep the image static. So I added fm=jpg but that doesn’t seem to work. Additionally, the width/height I provide are not applied, and the source image is basically passed through as-is, as an animated GIF.

Note that converting a standard JPG image from 1080p to 320p works as expected.
Am I doing something wrong or is this a known limitation with GIFs?

Thanks!
Chris

Do you have a reproduction URL to share?

Hi, thanks for taking a look!

You can see the issue here: https://geekometric.com/.netlify/images?fit=cover&fm=jpg&q=50&url=%2Fuploads%2F2024%2Fbender-laugh.gif&w=320

And with an edited size: https://geekometric.com/.netlify/images?fm=jpg&q=50&url=%2Fuploads%2F2024%2Fbender-laugh.gif&w=180

Meanwhile a JPG works fine: https://geekometric.com/.netlify/images?url=%2Fuploads%2F2024%2Fakimbot-party.jpg&w=320

Let me know if you need more info. Thanks!

Thank you for the reproduction. I have passed this to the devs.

1 Like

Sorry, this seems to be an undocumented limitation. Currently, GIFs are passes as-is. We don’t perform any transformations on them at all as they’re pretty compute resource intensive.