A short history of image formats

From GIF in 1987 to JPEG XL. The technical story is interesting; the story of which formats actually won is mostly about patents.

The timeline

1986 — TIFF
A flexible container for scanning and print. Still standard in both.
1987 — GIF
256 colours and, from 1989, animation. Encumbered by the LZW patent.
1992 — JPEG
Lossy photographic compression. Still the universal default.
1996 — PNG
Created explicitly to route around GIF's patent. Lossless, with real alpha.
2000 — JPEG 2000
Technically strong, never adopted on the web.
2010 — WebP
Google's replacement for both JPEG and PNG. Took a decade to win.
2017 — HEIC
Apple adopts HEIF/HEVC. Blocked from the wider web by licensing.
2019 — AVIF
Built on royalty-free AV1, explicitly to avoid HEVC's problem.
2021 — JPEG XL
Standardised, technically excellent, still fighting for browser support.

How we got here

The first generation: containers and compromises

TIFF (1986) came from the desktop publishing boom — a flexible tagged container that could hold almost anything, which is exactly why print and scanning still use it and why the files are enormous.

GIF (1987) was designed by CompuServe for dial-up: 256 colours, lossless LZW compression, and from the 1989 revision, animation. For flat graphics on a 1200-baud modem it was a good answer.

JPEG (1992) was the first format built specifically for photographs, and it got the hard part right immediately. Thirty years of successors have improved on it by 25–50% — meaningful, but not revolutionary. Nothing has replaced it.

PNG exists because of a patent

In 1994 Unisys began enforcing its patent on the LZW algorithm that GIF depended on, demanding licence fees from developers of software that wrote GIFs.

The response was immediate and organised: within months a group of developers had specified PNG (1996) around the patent-free DEFLATE algorithm, and made it better than GIF while they were at it — truecolour instead of 256, and a full 8-bit alpha channel instead of binary transparency.

The patent expired in 2003 and 2004. PNG had already won on merit for still graphics, and GIF survived only for animation — a niche it holds to this day through sheer cultural inertia.

This is the first time the pattern appears: a licensing problem produces a free alternative, and the free alternative wins.

The formats that did not take

JPEG 2000 (2000) was genuinely better than JPEG — wavelet-based, with lossless and lossy modes and excellent scalability. It went nowhere on the web. Browser support never arrived, encoding was slow, and the patent situation was murky enough to deter implementers. It survives in medical imaging, cinema and archiving, where those constraints do not apply.

BPG (2013), from the author of FFmpeg, produced remarkable results by wrapping HEVC in an image container. It was never going to ship, for exactly the reason HEIC did not: HEVC's licensing.

The lesson both teach is that technical superiority does not decide adoption. Browser vendors do, and they will not ship what they cannot licence freely.

WebP, and the decade it took

WebP (2010) was Google's attempt to replace JPEG and PNG at once — lossy and lossless in one format, with alpha and animation, derived from the VP8 video codec Google had bought and released royalty-free.

It was technically ready almost immediately and took ten years to become usable, because Safari did not support it until 2020. For most of the 2010s, using WebP meant maintaining a fallback for a significant share of visitors.

It is now the sensible default for images on the web, roughly fourteen years after it was released. Format adoption is slow in a way that surprises people every time.

The current generation, and the same argument again

HEIC (2017) is HEVC in a HEIF container. Apple shipped it as the iPhone default, and it stopped there. Chrome and Firefox will not implement HEVC, and Windows charged for the codec. Excellent format, unusable ecosystem.

AVIF (2019) is the direct response: the same approach built on AV1, which the Alliance for Open Media created specifically to be royalty-free. It shipped across every browser within a few years — precisely the reception HEIC did not get.

JPEG XL (2021) is the outlier. Standardised by the JPEG committee, royalty-free, faster to encode than AVIF, better at high quality, and uniquely able to repack existing JPEGs 20% smaller without loss. Chrome implemented it, then removed it. Safari ships it. Firefox keeps it disabled.

So for once the obstacle is not patents but the priorities of a browser vendor — which turns out to be just as decisive.

What the pattern predicts

Four things have decided every outcome on this list, in roughly this order of importance: whether it can be implemented without paying anyone, whether the largest browser ships it, whether encoding is fast enough to be practical, and only then how well it compresses.

Formats that got the first two right have won even when technically unremarkable. Formats that got them wrong have failed regardless of how good they were. It is worth remembering the next time a new format is announced.

Try it yourself

Everything below runs in your browser, so you can test any of this on your own files without uploading them.

  • Compress JPEG

    Shrink JPG and JPEG photographs with a quality slider or an exact target size.

    Open the tool
  • Compress WebP

    Re-encode existing WebP files, or convert JPEG and PNG into WebP.

    Open the tool
  • Compress PNG

    Lossless by default, with transparency carried through untouched.

    Open the tool

Questions

Frequently asked questions

Every answer below is present in the page source, expanded, so it can be read without opening anything.

Why was PNG created?

To route around a patent. Unisys began enforcing its LZW patent in 1994, which GIF depended on, so developers specified PNG around the free DEFLATE algorithm within months — and made it better than GIF while they were at it, with truecolour and a proper alpha channel.

Why did JPEG 2000 fail?

Browsers never implemented it. Encoding was slow, the patent position was unclear enough to deter implementers, and by the time it might have gained traction JPEG was entrenched everywhere. It still thrives in medical imaging and cinema, where those constraints do not apply.

Why is JPEG still the default after thirty years?

Because it got the hard part right in 1992 and because universal support compounds. Every camera, printer, browser and application handles it. Newer formats beat it by 25–50%, which is meaningful but not enough to overcome three decades of ubiquity.

Why did AVIF succeed where HEIC did not?

Licensing. Both use video-codec technology, but AVIF is built on AV1, created specifically to be royalty-free. HEIC uses HEVC, whose patent pools made it impossible for open-source browsers to implement. Same idea, opposite outcome.

How long does a new format take to become usable?

Roughly a decade, judging by WebP — released in 2010, genuinely usable everywhere in 2020. Adoption is gated on the slowest major browser, not on the format's readiness.

What is likely to come next?

Hard to say, and the history suggests the deciding factor will not be compression efficiency. Whether JPEG XL becomes usable depends on Chrome, and any future format will face the same two tests first: can it be implemented for free, and will the largest browser ship it.

From the blog

Related reading

Longer, more practical guides from the blog.

  • Image Formats

    PNG vs JPEG: When to Use Each, With the File Sizes to Prove It

    PNG stored the same photograph in 1274.1 KB where JPEG needed 67.5 KB — nineteen times larger. On a flat graphic PNG won. On a smooth gradient PNG lost to JPEG by a factor of two, which surprises most people.

    9 min read

  • Image Formats

    WebP vs JPEG: Which Should You Use, and When JPEG Still Wins

    WebP produced a 27.0 KB file against MozJPEG's 41.1 KB on the same photograph at slightly higher measured fidelity — 34% smaller. It also produced a larger file than JPEG on random noise. The advantage is real and content-dependent.

    9 min read

  • Practical Guides

    How to Compress Images for a Website Without Wrecking Them

    Resize before you compress. Measured on one photograph: half the width at quality 80 produced a 16.4 KB file, while full width at quality 40 produced 20.6 KB and looked far worse. The order of operations matters more than the settings.

    8 min read