Home - Zines

Combining Multiple Images into an Animated GIF with ImageMagick

I often have a small set of images that I’d like to combine into a single animated gif. I do this for moving screen shot examples among other things. This is easy to do with ImageMagick.

 magick -delay 100 -loop 5 -dispose previous 1.png 2.png 3.png animated.gif

The -delay is in hundredths of seconds.

A value of 0 for -loop will result in an endless loop.

The -dispose previous flag clears the previous frame before drawing the next (this is what you typically want). See the documentation for more information about that.

In older versions of ImageMagick the command is convert instead of magick.

Written by Joel Dare on February 25, 2022. Last updated on April 20, 2025.


Get battle-tested dev tips, terminal wizardry, and practical Mac hacks from a veteran engineer who speaks your language. Subscribe now and power up your toolkit—no fluff, just real code magic.

Show Me Your Hacks

JoelDare.com © Dare Companies Dotcom LLC

Terms - Privacy