JPG vs WebP

Image2 min read

How much smaller WebP really is, what it can do that JPG cannot, and the one situation where JPG is still the right answer.

In short

WebP produces smaller files than JPG at the same visual quality and supports transparency. Every current browser handles it. Stick with JPG only when the file is going somewhere outside a browser that may not accept it.

These are both lossy formats for photographs, so the comparison is narrower than JPG versus PNG. It comes down to efficiency, transparency and compatibility.

Where they differ
JPGWebP
File size at matching qualityBaselineMeaningfully smaller
TransparencyNoYes
Browser supportUniversalUniversal in current browsers
Outside the browserAccepted everywhereSometimes rejected
Lossless modeNoYes

Why WebP is smaller

WebP's lossy mode came out of the VP8 video codec, and it brought prediction with it: instead of describing each block from scratch, it predicts a block from its already-decoded neighbours and stores only the difference. Photographs have a lot of local similarity, so there is a lot to predict. JPEG, designed in 1992, has no equivalent.

When to still use JPG

One reason, and it is a good one: the file is leaving the browser. Email attachments, upload forms on older systems, print shops, internal business software, some desktop image viewers. If a person will open it rather than a web page displaying it, JPG cannot be refused.

In Dexta

Convert Format moves an image directly between JPG, PNG and WebP. Compress Image has a Convert to WebP checkbox alongside the quality slider, which is the easier route if you are shrinking anyway.

Mistakes worth avoiding

  • Converting an existing JPEG to WebP and expecting the original quality. The JPEG damage comes along — you have re-packaged it, not repaired it.
  • Serving WebP as a download link without checking the recipient can open it.
  • Assuming a fixed percentage saving. It varies with the image; a flat graphic behaves nothing like a detailed landscape.