5 Convert the images into an Animated Gif
1. Use imagemagick to convert the png/jpg images to an animated gif:
convert *png animated.gif
2. If you removed a lot of frames (or there is some other reason) you may find that the gif loops too quickly. You can adjust the time by using the ‘-delay’ flag:
convert -delay 25 *png animated.gif

3. Another way to reduce file size is to resize the gif to a smaller, but still coprehensible size[1]:
convert *png -resize 400x animated.gif

4. While there are a lot of ways to optimize a gif, imagemagick has a built-in optimizer which generally does a good job. The size of the gif went from 559kB to 46kB without having to sacrifice size:
convert *png -layers Optimize animated.gif

5. And we can combine some of the above to make a gif that isn’t too big and is comprehensible:
convert -delay 25 *png -layers Optimized animated.gif

- the '400x' part tells imagemagick to make the gif 400px wide while maintaining the aspect ratio ↵