# Optimized / Resized GIFs lose all animation, become still frames

**URL:** <https://meta.discourse.org/t/optimized-resized-gifs-lose-all-animation-become-still-frames/19714>\
**Category:** Feature\
**Created:** [6. September 2014 um 07:17 UTC](https://meta.discourse.org/t/optimized-resized-gifs-lose-all-animation-become-still-frames/19714 "2014-09-06T07:17:36Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![fysics](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fysics/32/34080_2.png) [@fysics](https://meta.discourse.org/u/fysics)\
**Post date:** [6. September 2014 um 07:17 UTC](https://meta.discourse.org/t/optimized-resized-gifs-lose-all-animation-become-still-frames/19714/1 "2014-09-06T07:17:36Z")

</div>

The title says it all. When oversized animated gif files are resized, only the first frame is preserved.

After a bit of [research](http://webcache.googleusercontent.com/search?q=cache:GULQ0D2RZLoJ:https://fosswiki.liip.ch/display/BLOG/Resizing%2banimated%2bGIFs%2bwith%2bImageMagick%20&cd=1&hl=en&ct=clnk&gl=us), it looks like the solution is to first coalesce the gif before resizing it. This “fills out” the incomplete frames so they can be resized, retaining the animation, by ImageMagick.

Seemingly paradoxically, this usually results in a larger file size than you started with. The coalescing process can be effectively reversed by [optimizing](http://www.imagemagick.org/Usage/anim_opt/) the resized gif.

So, we have a few possible solutions:

1. Coalesce, resize, then optimize gifs rather than sending them through the same optimization process as other images.
2. Allow browsers to resize gifs client side.
3. Some more involved process resembling YouTube lazy embeds, where gifs don’t animate until you click / hover them. (See e.g. [9gag.com](http://9gag.com))

I’m definitely in favor of the first option.

---

_[View the full topic](https://meta.discourse.org/t/optimized-resized-gifs-lose-all-animation-become-still-frames/19714)._
