Format · GIF

A 1987 format
that refuses to die

GIF stores an image with a 256-colour palette and compresses it with LZW. It has no quality dial, no real transparency and no interframe prediction — and it is still the default for a looping animation nobody planned for.

Palette · LZW · Animation · 1-bit alpha
256 colours max0 quality dial1 bit transparency
Inside

Two constraints, both severe

Everything GIF cannot do follows from its palette and its frame model.

Reference

The palette is the format

A GIF image is a grid of indices into a table of at most 256 colours. There is no per-pixel colour; there are only references. A photograph forced into that table dithers into noise, and a smooth gradient bands into visible steps before any compression happens at all.

Compression is LZW over those indices — an entropy coder from an era before image-specific modelling. It is efficient on flat regions of repeated indices, which is exactly what a logo or a flat illustration produces, and nearly useless on photographic content.

Transparency is binary

GIF has a single fully transparent palette entry. There is no alpha channel, so a soft edge becomes a hard one. Drop a GIF onto a different background colour and the fringe is immediate — the classic halo around exported logos.

None of this is a defect for the format's original purpose. GIF was designed for small, flat, indexed graphics transmitted on slow links, and for that it is close to optimal. The problem is that it is now used for animation, which it was never designed to do well.

Animation

Why animated GIFs are enormous

An animated GIF is a sequence of complete pictures. Each frame is coded independently, so every frame pays full price even when almost nothing changed.

ApproachHow frames relateRelative size
Animated GIFEvery frame stored wholeBaseline
Animated WebPSome interframe predictionMuch smaller
MP4 / WebM (H.264)Predicted from keyframesRoutinely 5–20× smaller
loop.gif 12 MB → 0.9 MB−92%

Same pixels, same loop, a different container. The saving is entirely from not re-sending unchanged frames.

Practice

What you can actually do about a GIF

Four levers exist. Only one of them changes the format.

01 01
Drop frames

Halve the frame rate. Many loops are captured at 30fps and read identically at 15.

02 02
Shrink dimensions

Pixels cost more than frames. A 480px-wide loop is usually enough on the web.

03 03
Reduce the palette

Fewer colours compress better, until banding appears in gradients.

04 04
Leave GIF

A video container with interframe prediction beats all three levers, often combined.

Suits

Where GIF still wins

Three niches, all of them about the file being self-contained rather than efficient.

Everywhere, without a player A GIF autoplays in any browser, any chat client, any document — no codec negotiation.
Small flat loops A two-colour spinner at 400px is genuinely tiny.
Places that reject video Some mail clients, ticket systems and CMS uploaders accept GIF and nothing else.
Exact palettes Indexed colour is a feature when the artwork already has 16 colours.
Replacement

The video equivalent

For a looping animation on the web, an autoplaying muted video is smaller, sharper and seekable. The only real cost is that it needs a tiny amount of markup.

Encode once, keep the poster frame as an image, and let the browser handle playback. If the animation must work where video cannot, animated WebP is the next best option — it keeps interframe prediction inside an image file. See what is WebP for what that container supports.

GIF is the only common image format where the file size is dominated by a design decision made before the web existed.

FAQ

GIF — FAQ

01
Is GIF lossless?

Yes for the palette indices, no for the colour. Converting a photograph to GIF destroys it before compression even begins.

02
Does GIF support transparency?

One fully transparent colour, no partial alpha. Soft edges become hard, which is why logos fringe on new backgrounds.

03
Why is my animated GIF 15MB?

Every frame is a full image. Video codecs predict each frame from previous ones; GIF cannot.

04
Should I compress GIFs or convert them?

Convert if the destination allows video or WebP. Compress only if GIF is a hard requirement.

05
Is APNG better?

Technically — 24-bit colour and full alpha. Support is decent in browsers but worse in chat clients and older tools, which is where GIF usually lives.

GIF · limits

When the loop must stay an image

Compressy handles JPG, PNG, WebP and AVIF — for GIF the honest answer is a video container, or a smaller palette and fewer frames.

Windows 10/11 · Offline · Free