← All articles

WebP vs PNG vs JPEG — Measuring What Compression Really Costs

Every conversion is a trade

Modern image workflows are full of conversions: PNGs converted to WebP to cut page weight, JPEGs re-saved at quality 80, screenshots pushed through an optimizer pipeline. Each one trades bytes for quality — and the marketing always mentions the bytes (“30% smaller!”) while staying vague about the quality.

The quality side is measurable, per image, in seconds.

Squinting doesn’t work

Flipping between two versions of an image is a terrible test: your eyes adapt, JPEG artifacts hide in busy textures, and the differences that matter (banding in a gradient, smeared text, colour shifts) are exactly the ones casual inspection misses. What you want is a score and a map.

The measurement

Upload the original and the converted file to DiffALL:

  • SSIM score — perceptual similarity, weighing structure and contrast the way human vision does. 99%+ means the conversion is visually free; 95% means someone will notice.
  • Difference heatmap — lights up where the encoder did damage. JPEG hurts sharp edges and text; aggressive WebP smooths fine texture; palette reduction bands gradients. The heatmap tells you which one bit you.
  • PSNR — a second opinion, useful for comparing candidates on equal footing.

Formats are compared by decoded content, so a PNG against a WebP works directly — exactly the comparison you need when deciding whether the conversion is safe.

A workflow for picking settings

  1. Take 3–5 representative images — include your worst cases: text on flat backgrounds, gradients, detailed photos.
  2. Convert at the candidate settings (e.g. WebP quality 75 vs 90).
  3. Compare each result against its original and note the scores.
  4. Pick the smallest setting that stays above your threshold — 97%+ SSIM is a solid bar for product and content imagery.

Five minutes of measuring beats months of shipping images that are quietly worse than they need to be — or bigger than they need to be.

Beyond one-off checks

Running this on every deploy? The same comparison is available through the DiffALL API, so a CI step can fail the build when an optimizer update pushes an image below your quality bar — visual regression testing for your asset pipeline, not just your UI.

Try it

Drop an original and its converted version onto DiffALL — score, heatmap, and verdict in seconds. Free, no install.

Stop hunting for differences by hand. DiffALL spots every change between any two files — automatically.

Compare your files — free