How I compress GIFs using Photoshop

You finished an animation on After Effects now you need to compress it to fit a 3MB size limit your client told you the developers need.

There are quick solutions to convert a video into a GIF:

  • You have GIFgun you can install on After Effects

  • You also have websites like EZGif.com which do a great job.

But if you’re looking for more granularity in the controls of how the GIF is rendered my recommendation is good old Photoshop and its legacy Save For Web.

A GIF file size is dependent on multiple variants:

  • Number of frames – and how much each frame is different from the others

  • Number of colours – from 1 to 256

  • Canvas/Artboard dimensions – the actual pixel width and height

  • How you apply techniques like Dither and Lossy (on Photoshop).

There’s nothing like a real example, take our Motion Design thumbnail in our homepage:

HP-Thumbnail-Motion-v1-01.gif

This GIF was originally landing at almost 10MB. With the techniques below I was able to bring it down to to 3MB (less 70%).


Step 1

Render the video using After Effects as a lossless MOV file.

step-1.gif

Step 2

Open it with Photoshop. 

Do not import the frames to layers, using the timeline feature will give us more flexibility.

Blog-GIF-Compression-Step-2.gif

Step 3

Reduce the frame-rate.

Let’s cut the frame-rate in half from 24 to 12. You can play around with the frame-rate until you find a good balance between the file size and how choppy the end result is.

Blog-GIF-Compression-Step-3-v2.gif

Step 4

Colours, dither and lossy controls.

Let’s start small:

  • Cut the Colours in half (from 256 to 128).

  • Reduce Dither by just 1%.

  • Increase Lossy by just 1

In my case these small tweaks were enough to bring the file size down 70% but there’s a lot of granularity available with these controls. If you need to reduce the file size further try reducing Dither even more, or increase the Lossy amount. If these values your lose a lot of vibrance in the colour, maybe try leaving the colours at 256.

Blog-GIF-Compression-Step-4-v2.gif

Step 5

Export it and check the size and the quality of the image.

Blog-GIF-Compression-Step-5.gif
 
Previous
Previous

Favourite After Effects plugins (2020 edition)

Next
Next

Stuff We Like #1: Video game projects