WebP vs AVIF vs JPG: which is best for your website?

By Le Roux · Updated 30 October 2026 · First published 18 October 2026 · 6 min read

Images are usually the heaviest part of a web page. Picking the right format can cut page weight dramatically and improve your Core Web Vitals scores.

The short answer

How they compare

FormatTypical size vs JPGTransparencyBrowser support
JPGBaselineNoUniversal
PNGOften much larger for photosYesUniversal
WebP27% smaller on average (20–36%)YesAll current browsers
AVIF40% smaller on average (36–50%)YesAll current browsers (Safari 16+)

The WebP and AVIF figures are our own measurements: we encoded five public-domain test photos in each format and compared file sizes at the same visual quality, measured with SSIM. Comparing at the same quality number would be misleading, because quality 75 means something different in each format.

PhotoWebP saving vs JPGAVIF saving vs JPG
Astronaut22%38%
Coffee32%47%
Cat20%40%
Rocket36%50%
Hubble star field25%36%

Smooth subjects (the coffee cup, the sky behind the rocket) saved the most; the busy star field saved the least. Results on your own images will vary, so try it. Our compressor shows the exact size of every result, and you can tap a thumbnail to compare quality side by side.

Don’t forget the dimensions

A perfectly compressed 4000-pixel photo is still far too big for a 800-pixel-wide blog column. Resize to roughly the largest size it will be displayed at (or twice that for sharp high-DPI screens), then compress.

Serving modern formats with a fallback

If you need to support very old browsers, use the HTML <picture> element: list an AVIF source, then WebP, then a JPG <img> as the fallback. Each browser downloads only the first format it supports.

Encoding speed

AVIF’s smaller files come at a cost: it takes noticeably longer to create than WebP or JPG, especially for large photos. That doesn’t matter for a handful of images, but for thousands of product photos WebP is the practical default. Viewing is fast in all three formats.

Convert your images in bulk: JPG to WebP, PNG to WebP, or choose AVIF in the image converter.

More guides