3 step guide to email-friendly MEGA-GIFs

3 step guide to email-friendly MEGA-GIFs

TL:DR – This article is about creating silky-smooth awesome GIFs with a tiny file size 🙌🏼

Even though we’re taking brave steps into things like CSS & SVG animation, you still can’t beat a solid GIF for cross-platform animation support.

It may have just celebrated it’s 30th (Yes, thirtieth) birthday, but you’d be surprised how much you can still squeeze out of a GIF with a bit of optimisation. It’s totally possible to make something outlandish like a 10 second GIF running at 25 frames per second (FPS) that weighs in at 1MB instead of 20MB.


Use an illustrative style with a limited colour palette
GIFs really start to bulk out when you use a broad colour palette. By using an illustrative style with a handful of colours you can add a surprising amount of detail and motion to a GIF without adding much file size.
This brilliant (and adorable) series of GIFs from James Curran weigh in at 1-1.5MB each at 540×540. Crazy, huh? (Psstt…After Effects nerds – you can see how he makes these)
TokyoGifathon30

Freeze unanimated sections

If you’re doing a straight-up video-to-GIF conversion, freeze any areas that are not animating. Even totally still objects in a video will have their pixels change slightly from frame to frame – adding unnecessary file size.The GIF below is a 25 frames per second straight up conversion from a video, weighing in at a horrible 4.4MB.

Candle_3
We can freeze all of the pixels around the flame (and flame reflection), by copy/pasting the first frame over the top of the video, and erasing the sections that animate. This way, the GIF is totally static, apart from the video that’s animating underneath.
Screenshot 2017-08-15 16.01.20
After freezing the unanimated sections the GIF size drops from 4.4MB to 1.4MB, a pretty drastic drop, but looks pretty much identical.
Candle_2
We can take things one step further by reducing the frame rate from 25 frames to 10 frames per second. Ta-da! We now have a GIF that looks practically identical to our 4.4MB starting monster, but only weighs in at 590kb 🎉
Candle_3

Say no to excessive content, colour & gradients
Nothing kills a GIF faster than too many colours. GIFs are limited to 256 colours as a maximum, which is bad news for photorealistic animation at a manageable file size – or else you end up with a dreaded over-dithered GIF that looks all pixely – like this guy below.
dither-me-timbers
If you have to use gradients in a GIF (pls don’t) it’s best to remove as many other colours as possible, and keep things simple.The GIF above has been reduced from 7 images to 4, and kept to roughly the same colour palette (removing the colourful salad, field images etc…).You can still spot some less-than-ideal banding and pixely dithering doing on, but it looks a lot better than before.

dither-me-timbers2

By Sam Beddoes

Sam Beddoes is a Designer at Action Rocket, an email creative studio based in London. Find him on Twitter at @B3ddoes