The decision table
| Use case | Best choice | Fallback |
|---|---|---|
| Photos on a website | WebP (q75–82) | JPEG |
| Photos, maximum compression at scale | AVIF + WebP | JPEG |
| Logos, icons with transparency | WebP (q90+) or SVG | PNG |
| Screenshots, UI graphics | WebP (q85–92) | PNG |
| Short animations | Animated WebP or MP4 | GIF |
| Editable master files | PNG / TIFF / RAW | — |
| Email newsletters | JPEG / PNG | — |
| TIFF / PNG / PDF | — |
Feature comparison
| JPEG | PNG | WebP | AVIF | |
|---|---|---|---|---|
| Year | 1992 | 1996 | 2010 | 2019 |
| Lossy | Yes | No | Yes | Yes |
| Lossless | No | Yes | Yes | Yes |
| Transparency | No | Yes | Yes | Yes |
| Animation | No | APNG | Yes | Yes |
| HDR / 10-bit | No | 16-bit | No | Yes |
| Size vs JPEG (photos) | 100% | 300–500% | 65–75% | 50–60% |
| Encode speed | Very fast | Fast | Fast | Slow |
| Browser support | 100% | 100% | 97%+ | ~93% |
JPEG: the incumbent
JPEG's strengths are universality and speed. Every device on earth can display it. Its weaknesses are outdated compression, no transparency and blocky artifacts at low quality. In 2026 it belongs in the fallback slot, not the primary one.
PNG: the master format
PNG is lossless and supports alpha, which made it the default for anything JPEG couldn't handle. But 'lossless' also means huge, especially for photos. Use PNG as the file you keep and edit; publish a WebP export. See WebP vs PNG.
WebP: the pragmatic default
One format for photos, graphics, transparency and animation, with 25–35% smaller files than JPEG and support in 97%+ of browsers. Fast enough to encode in a browser tab. If you only adopt one modern format, this is the one. See WebP vs JPEG.
AVIF: the compression champion
AVIF squeezes another 10–20% out of photos and supports HDR, but it encodes slowly and tooling is still catching up. It shines in automated pipelines (Next.js Image, image CDNs) where the cost of encoding is paid once. Serve it with a WebP fallback. See WebP vs AVIF.