Skip to main content

← Back to blog

AVIF vs WebP vs JPEG: Which Image Format Wins?

Three formats dominate photographic images on the web today: the classic JPEG, the widely-supported WebP, and the newcomer AVIF. They do the same job — compress photos — but at very different efficiencies. Here is how they stack up.

We measured this ourselves. On our own converters, a photo already saved as JPG only shrank 9% when re-encoded to WebP (330.2 KB to 301.9 KB) — there was little left to squeeze. But a screenshot that someone had saved as JPG dropped 84%, from 45.3 KB to 7.3 KB. AVIF we could not measure at first, because a browser canvas cannot encode it — we have since generated the test files with ffmpeg and libaom-av1, and the result is the most one-sided in our whole table: our 1200 × 800 UI capture fits into 1,472 bytes as AVIF, and every conversion away from it grew the file, by 92% at best and 2704% at worst. see the full measurements

Compression and quality

At the same visual quality, file sizes usually rank like this:

  • AVIF — smallest, often 30–50% smaller than JPEG.
  • WebP — middle, typically 25–35% smaller than JPEG.
  • JPEG — largest, but still perfectly usable.

AVIF also handles dark gradients and flat color better (less banding), and both AVIF and WebP support transparency, which JPEG does not.

Browser and app support

This is where the order flips:

  • JPEG — works literally everywhere, forever.
  • WebP — supported by all current browsers; safe for the web today.
  • AVIF — supported by current Chrome, Edge, Firefox and Safari, but older devices and many desktop apps still can’t open it.

See What is WebP and What is AVIF for the details.

Which should you use?

  • A website you control: serve AVIF or WebP for speed, with a JPEG fallback for old clients.
  • A file you send to someone: JPEG (or PNG) so it opens anywhere.
  • Needs transparency: WebP or AVIF (or PNG); never JPEG.
  • Maximum compatibility over size: JPEG.

For the JPEG-vs-PNG side of the decision, see PNG vs JPG.

That ordering is stable but the size of the gap is not, and it is the gap that should drive the decision. A photograph narrows it considerably; a screenshot widens it to the figures above. So the honest rule is not “always AVIF” — it is: serve AVIF where the content is flat or synthetic, and treat 43.7 KB as the cost of the JPEG fallback you still have to ship.

Convert between them — free, no upload

Everything runs in your browser:

Rule of thumb: AVIF or WebP on your own site, JPEG when you hand a file to someone else.

Side-by-side at a glance

FeatureJPEGWebPAVIF
Typical size vs JPEGbaseline~25–35% smaller~30–50% smaller
Transparency (alpha)NoYesYes
AnimationNoYesYes
Lossless modeNo (in practice)YesYes
Colour depth8-bit8-bitup to 10/12-bit, HDR
Max dimensions65,535 px16,383 pxvery large
Encode speedFastFastSlower (CPU-heavy)
SupportEverywhereAll modern browsersRecent browsers only

The clearest way to rank three codecs is to start from the smallest and see what the other two charge. Our 1200 × 800 UI capture is 1.4 KB as AVIF; here is the same picture leaving it:

ConversionAVIF inResultChange
AVIF → JPG1.4 KB43.7 KB+2942%
AVIF → WebP1.4 KB6.9 KB+378%
AVIF → PNG1.4 KB36.5 KB+2442%

WebP asked 6.9 KB (+378%) and JPG 43.7 KB (+2942%) for the same visible image. On a screenshot the gap is at its widest, because flat areas and hard 1-pixel edges are exactly what AVIF handles best and what JPEG handles worst.

Common misconceptions

  • “AVIF is always the smallest.” Usually, but not for every image. On small icons, flat graphics or sharp screenshots, lossless WebP or PNG can tie or win, and at very high quality the AVIF advantage shrinks.
  • “Converting a JPEG to AVIF makes it look better.” It cannot. Re-encoding never recovers detail the original JPEG already discarded — you only change the container and the file size.
  • “WebP handles any resolution.” It does not. WebP caps out at 16,383 pixels on each side, so huge panoramas or scanned artwork may need JPEG or AVIF instead.

FAQ

Is AVIF better than WebP?

For photos, AVIF is usually smaller at the same quality and adds HDR. The trade-offs are slower encoding and slightly narrower support, so many sites still ship WebP — or serve AVIF with a WebP fallback.

Do I still need JPEG in 2026?

Yes. It remains the safest format for files you email, print or upload to older systems.

Which is fastest to create in bulk?

JPEG and WebP encode quickly; AVIF is noticeably slower, which matters when you process thousands of images at once.

For the wider view, see Image formats explained and the best image format for the web.