Field guide · 6 minute guide

WebP vs AVIF vs JPEG: choose by the image

There is no permanently smallest format for every image. Start with the content, browser requirements and transparency needs, then compare outputs from the same source.

Reviewed September 14, 2026

The useful differences

JPEG remains a dependable choice for photographs when broad compatibility and quick encoding matter. It is lossy and does not carry an alpha transparency channel.

WebP supports lossy and lossless compression plus transparency. It is a practical modern default when you want one format for photographs and transparent graphics across current browsers.

AVIF can be very efficient for photographic content and supports transparency, but encoding is usually heavier. That tradeoff matters in an interactive browser tool and in build pipelines.

QuestionJPEGWebPAVIF
Photo deliveryDependable baselineStrong general defaultWorth testing for lower bytes
TransparencyNoYesYes
Encoding effortUsually lowestModerateUsually highest
Best decision ruleCompatibility firstBalanced defaultMeasure savings against encode cost

Two examples, two different shortlists

Imagine a 2400 × 1600 product photograph with no transparency. Export the same resized source to JPEG, WebP and AVIF, then compare bytes and visible detail at the intended display size. If AVIF saves only a small amount for noticeably slower encoding, WebP or JPEG may be the better operational choice.

Now imagine a logo with soft transparent edges. JPEG is removed from the shortlist because it needs a solid background. Compare PNG, WebP and AVIF instead; a photographic format comparison would answer the wrong question.

A repeatable decision process

A format label is not a performance result. Dimensions and quality settings can outweigh the container choice, and an already efficient source can grow after re-encoding.

  • Resize to the largest dimension the layout actually needs before judging formats.
  • Use the same source pixels and inspect at the real display size.
  • Compare bytes, visual artifacts, transparency and encode time together.
  • Keep a fallback only when your browser or delivery requirements call for one.

Primary references