Keeping Animated GIFs Small

A five second GIF can be 400 kilobytes or 40 megabytes depending on decisions you make before you press generate. The format is nearly forty years old and it compresses nothing like modern video, so the only real control you have is how much material you hand it. Here is what drives the size and where the sensible limits sit.

Step-by-step: see our guide to making an animated GIF for the basic workflow. This article covers the optimisation decisions around it.

Why GIFs are so large

Three properties of the format explain almost everything.

Every frame is a whole picture. Modern video codecs store one full frame and then only the differences that follow, which is why a mostly static clip compresses to almost nothing. GIF has only a crude version of that idea, so in practice a twenty frame animation costs roughly twenty times one frame.

The palette is capped at 256 colours per frame. A photograph contains far more, so the encoder has to quantise and usually dither the result. Dithering scatters pixels, which destroys the runs of identical pixels that the compression relies on. This is why photographic GIFs are enormous and flat graphics with few colours are tiny.

Compression is lossless. There is no quality dial to trade away detail the way JPEG lets you. The only levers are how many pixels and how many frames you supply.

The three levers that matter

Dimensions, which cost the most

File size scales with the pixel count, so it grows with the square of the width. Halving 800 pixels to 400 does not halve the file, it cuts it to roughly a quarter. This is far and away the most effective change you can make. For a chat message or an inline demo, 320 to 480 pixels is usually plenty; social feeds display GIFs small anyway.

Frame count

Cost is close to linear here. Twelve frames instead of twenty-four is half the file. Most animations survive aggressive frame trimming better than people expect - a walk cycle or a UI demo reads perfectly at eight to twelve frames per second, which is where hand-drawn animation has always lived. Drop every second frame and lengthen the delay to keep the same duration.

Frame delay

The interval control sets how long each frame is held, in seconds. It changes the perceived speed and the total running time, but not the file size, since the same frames are stored either way. Use it to make a shorter sequence feel right rather than adding more frames.

What else genuinely helps

When you should not be making a GIF

If the source is real video with continuous motion and rich colour - anything filmed, anything longer than about ten seconds - a short MP4 or WebM will typically be a small fraction of the size at better quality, because those codecs do exactly the interframe compression GIF cannot. Every major platform supports inline video now, and several silently convert uploaded GIFs to video anyway.

GIF still wins in three places: email clients and older tools that will not play video, contexts where autoplay and looping must be guaranteed, and short animated stickers or reaction images with few colours. Choose deliberately rather than by habit.

Working with the GIF Maker

Our GIF Maker assembles the frames you select and renders the animation in your browser, so a screen recording of an internal dashboard or a set of personal photos is never uploaded anywhere. Two things are worth knowing before you start.

Frames are used in the order the browser hands them over, which in practice means the order the filenames sort in. Name your frames 01.png, 02.png and so on, with leading zeros, and the sequence will be correct every time. Files named frame1 to frame12 will put frame 10 immediately after frame 1.

The output width you set is also the height, so the animation renders on a square canvas. If your frames are not square, crop them to a square before importing and you will keep exact control of the framing instead of letting the encoder decide.

Related reading

Shrinking the frames before you animate is the single biggest saving available, and resizing versus compressing explains how to pick those dimensions. If the animation is destined for a feed, the social media size cheat sheet covers what each platform expects.

Build an Animation

Select frames, set the interval and width, generate a GIF.

Open GIF Maker
Back to blog