Three formats cover almost every image on the web today. They are not interchangeable, and the right choice depends on what the image is, who needs to see it, and what it has to fit into.

The short comparison

JPGWebPAVIF
Typical saving vs JPGbaseline25–35% smaller50% smaller or more
TransparencyNoYesYes
AnimationNoYesYes
Lossless modeNoYesYes
Browser supportUniversalAll current browsersAll current browsers
Encoding speedVery fastFastSlow
Good forArchives, email, anything with a strict format requirementThe web defaultWhere bytes matter most and you control the pipeline

The catch with AVIF

AVIF produces the smallest files, but encoding is slow — noticeably so for large images or big batches. On a device without hardware AVIF encoding, the encode can take many seconds per image, and a browser may not offer AVIF encoding at all, in which case a converter has to fall back.

That is why AVIF is a strong default for delivery — converting once, server-side, and serving to everyone — but a poor default for a quick one-off conversion on a laptop.

When JPG is still the right answer

  • A form or portal specifies "JPG" explicitly. Fighting the spec wastes your time.
  • The file is an archival record. JPG is the safest format to still be able to open in twenty years.
  • You are emailing it. Some corporate mail gateways still mishandle WebP.
  • It is a photograph with no transparency, for a small audience, where compatibility matters more than bytes.

The PNG trap

Screenshots and logos saved as PNG are routinely ten times larger than they need to be, because PNG is lossless and a screenshot has a lot of near-identical pixels. Lossless WebP handles the same content at a fraction of the size.

The trap is using JPG for that content instead. JPEG adds ringing artefacts around hard edges and crisp text — exactly the features a screenshot is made of. Lossless WebP, or a well-chosen palette PNG, is the correct answer.

A rule of thumb

Photograph → WebP or AVIF. Screenshot or logo → lossless WebP or PNG. Anything going to a system that names a format → use the format it names.

Tools mentioned in this guide