WebP, AVIF or JPEG: choosing an image format in 2026
Three lossy formats, real size differences, honest support caveats, and a decision rule that fits in one sentence.
The short version, so you can stop reading if you like: use JPEG when someone else’s software has to open it, WebP for your own website, and AVIF when bytes matter more than anything.
The rest of this is why.
What the numbers actually look like
Encoding the same photographs at matching perceptual quality — measured with SSIM and checked by eye, not by trusting a single quality number across three different encoders — the pattern is consistent:
| Content | JPEG | WebP | AVIF |
|---|---|---|---|
| Portrait, 1600 px | 210 KB | 145 KB | 105 KB |
| Landscape with foliage, 2000 px | 480 KB | 340 KB | 250 KB |
| Flat illustration, 1200 px | 95 KB | 44 KB | 30 KB |
| Screenshot with text, 1400 px | 180 KB | 62 KB | 48 KB |
Two things stand out.
For photographs, WebP is roughly 30% smaller than JPEG and AVIF roughly 50%. Real, worth having, not revolutionary.
For flat colour, illustrations and screenshots, the gap is enormous — WebP is less than half, and AVIF less than a third. This is where JPEG’s age shows most: its discrete cosine transform was designed for photographic gradients and handles hard edges badly, producing the ringing artefacts you see around text in a JPEG screenshot.
The trade-offs nobody puts in the comparison table
Encoding time. JPEG encodes in milliseconds. WebP takes a few times longer. AVIF can take several seconds for a large image, because AV1 searches an enormous space of prediction modes. If you are converting one image, you will not care. If you are converting four thousand, you will.
Decoding time. AVIF is also slower to decode than JPEG. On a fast phone this is invisible. On a cheap Android device with a large hero image, it is measurable, and it partially offsets the download saving.
Support outside browsers. This is where the honest caveats live. All three formats work in every current browser. Outside browsers:
- Many desktop applications still refuse WebP and AVIF.
- Print shops and photo labs generally want JPEG.
- A great many government and institutional upload forms accept JPG and PNG only, and reject anything else without explanation.
- Older phones — and there are a lot of them still in use — vary.
Colour depth. AVIF supports 10- and 12-bit colour and HDR. JPEG is 8-bit. For most content this is irrelevant; for gradients — sunsets, studio backdrops, subtle vignettes — it is the difference between smooth and visibly banded.
The decision rule
Is someone else’s software going to open this file? If yes, JPEG. Not because it is good, but because it always works, and a file that does not open has no quality at all.
Is it going on your own website? WebP, served with a JPEG fallback. The support is universal in browsers, the saving is real, and the fallback costs three lines of HTML.
Is it a large hero image where bytes are the bottleneck? AVIF, with a WebP fallback and a JPEG
fallback below that. The <picture> element handles the negotiation.
<picture>
<source srcset="hero.avif" type="image/avif">
<source srcset="hero.webp" type="image/webp">
<img src="hero.jpg" alt="…" width="1600" height="900">
</picture>
Browsers pick the first format they support, so the ordering matters: most efficient first.
What about PNG
PNG is not really in this comparison, because it is lossless and the other three are not. It has one job it is excellent at — pixel-exact images with transparency, which means screenshots, logos, diagrams and icons — and one job it is terrible at, which is photographs.
If you have photographs saved as PNG, converting them to WebP typically cuts the size by 90% with no visible difference. If you have logos saved as JPEG, converting to PNG or WebP will remove the ringing artefacts around the edges that JPEG introduced.
Does converting an old JPEG to AVIF help
Partially, and less than you would hope.
Converting a JPEG to AVIF re-encodes it, so you get AVIF’s efficiency applied to an image that already has JPEG artefacts baked in. The file gets smaller — often by 40% — but the artefacts are preserved, and AVIF now has to spend bits encoding them faithfully.
If you still have the original, encode from that. If you do not, converting is still usually worth it for delivery; just do not expect the quality to improve.
The converter handles all of these, and each format pair page explains what that specific conversion costs.