Creating An Animated GIF from Images with ImageMagick

I often convert a few individual images into an animated GIF. It’s a simple one-liner with ImageMagick.

convert -delay 200 -loop 0 *.png animated.gif

Step by Step Instructions

  • Create a new folder called animated
  • Put all of your original single images into the animated folder
  • Open terminal and change to the animated folder
  • Run the command above

You should end up with a file called animated.gif that includes all of the .png images in your animated directory.

Command Breakdown

The convert command is included with ImageMagick. We use that command and then a few extra arguments to create our animated gif.

  • -delay 200 creates a 2 second delay between each image
  • -loop 0 causes the resulting gif to loop forever
  • *.png indicates that we want to combine all .png images in the current folder
  • animated.gif is the filename of the new animated gif