Home

Combining Multiple Images into an Animated GIF with ImageMagick

By Joel Dare - Updated April 20, 2025 - Written February 25, 2022

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.

Build your next site in pure HTML and CSS

Want to build your next site in pure HTML and CSS? Join the free Five-Day Neat Starter Email Course and build a lean, production-ready page before Friday.

Email Me the Crash Course


JoelDare.com © Dare Companies Dotcom LLC

Terms - Privacy