Images and Photos

How to Compare Image Quality After Compression: PSNR, SSIM and Heat Maps

Measure how much quality a compressed image lost with PSNR, SSIM and Delta E, see where with heat maps, and pick the best JPEG, WebP or AVIF setting.

Saizul Amin
Saizul Amin7 Nov 2026 · 3 min read
How to Compare Image Quality After Compression: PSNR, SSIM and Heat Maps

Compressing an image is a trade: fewer bytes for some lost detail. The question is always how far to go. Looking at two versions on one screen is unreliable, because eyes adapt and screens differ. Numbers alone are not enough either, because they do not say where the damage is. The Image Quality Compare (PSNR, SSIM and Butteraugli-Style Map) gives you both: scores and pictures of the difference.

Set up the comparison

Open the original, the best version you have, such as the camera export or a PNG master. Then add compressed versions in one of two ways. Open files made elsewhere, for example by your CMS, a CDN or an image optimiser. Or let the page encode the original itself: tick JPEG, WebP and AVIF, type qualities such as 90, 75, 60 and 40, and press Encode and score. AVIF encoding needs a browser that can write it; if yours cannot, the page says so and skips it.

Large originals are analysed at up to 2,048 pixels on the longer side by default, which keeps scoring quick. Raise it to 4,096 when you need detail and have the patience.

The three scores

PSNR, the peak signal to noise ratio, compares pixel values and reports the result in decibels. Higher is better, and identical images score infinity. It is simple and widely quoted, but it treats every pixel the same, so a little noise in a busy forest counts as much as a band in a clear sky.

SSIM, the structural similarity index, compares small neighbourhoods for brightness, contrast and structure. It runs up to 1 for identical images and follows what people notice better than PSNR does.

Delta E 2000 measures colour difference in the way human vision weighs it. The page gives the average, the 95th percentile and the share of pixels above 2.3, roughly the smallest difference most people see side by side. A low average with a high share above 2.3 means the damage is concentrated somewhere.

The perceptual score follows the idea behind Google's Butteraugli: errors in busy texture are masked, errors on smooth areas stand out. It is an approximation written for the browser, not Butteraugli itself, so treat its numbers as relative.

Reading the results

The table sorts copies by file size and shows the saving against the original. As a rough guide for photos, above about 40 dB with SSIM above 0.98 is very hard to tell apart at normal viewing, 33 to 38 dB shows small artefacts when you zoom, and below 30 dB the loss is easy to see. A verdict line puts each copy into one of those bands.

Click a row to show that copy, then switch views:

  • swipe, to slide between original and copy;
  • absolute difference, amplified up to 32 times;
  • SSIM map, with red where structure was lost;
  • Delta E map, with red where colours shifted most;
  • perceptual map, with red where the loss is most likely to be noticed.

The maps answer the question numbers cannot: is the loss in the sky, around text, on skin or in hair?

Choosing a setting

Look for the knee of the curve: the point where file size keeps dropping but the scores start falling fast. For most photos on the web that sits around JPEG 70 to 80, WebP 70 to 80 and AVIF 50 to 65. Check the maps of your candidate at that point; if the red sits on faces or logos, step up one quality level.

Save the table as a CSV report to share the decision, and save any view as a PNG for a slide or a ticket.

Fair comparisons

Compare copies with the same pixel size as the original. If a copy was resized, the page resizes it back and marks it with an asterisk, but resizing adds its own small error. Colour profiles and metadata are ignored, because the scores compare decoded pixels. Everything runs in the browser, so client photos and unreleased product shots stay on your machine.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages