Compressing Images for the Web: Real Sizes at Four Qualities

By Junaid Aslam. 6 min read. Updated .

A quality slider asks you to trade bytes for detail without showing you the trade. We put three photos through Compress Images at quality 90, 75, 50, and 25, three runs each, and measured both the file size and the pixel difference.

Two results stood out. Quality 90 made every file larger than its input, because the inputs were already compressed at about 85. And quality 75 cut 17 to 28 percent with no difference we could see on two of the three photos.

The three inputs

The inputs are the site's own guide copies, 1024 px on the long edge, saved as WebP when those guides were built. That matters: they are second-generation files. A camera JPEG would have more detail to give away, and a first compression at the same quality would look cleaner than a second one.

FilePixelsBytesAuthor
monarch.webp955 by 102474,774sbmeaper1
sunflower.webp1024 by 87458,592ALAN SCHMIERER
chess-set.webp1024 by 683118,066Alan Levine

All three are CC0. The credits at the end list the source page and the exact license label each page shows.

How the runs were made

Each run opened a fresh browser context, uploaded all three files at once, moved the quality slider, and clicked Compress 3 images. Then it clicked Download all and saved the three files. The bytes below are the downloaded files, not the size text the page shows.

The page recompresses WebP input as WebP without resizing, so every output keeps the input dimensions. That makes a pixel-by-pixel comparison valid. Three runs at each quality produced byte-identical files, so each number below stood for three runs.

Bytes out at each quality

Qualitymonarchsunflowerchess-set
Input74,77458,592118,066
9091,160 (+21.9%)69,534 (+18.7%)142,086 (+20.3%)
7558,426 (-21.9%)41,982 (-28.3%)98,590 (-16.5%)
5041,616 (-44.3%)27,490 (-53.1%)56,738 (-51.9%)
2529,696 (-60.3%)19,336 (-67.0%)37,452 (-68.3%)

The quality 90 row is not a typo. The slider allows a higher setting than the quality the files already used, so the tool spends more bytes to encode a cleaner version of an image that had already thrown that detail away. The result is bigger and no closer to the original scene.

That is the first lesson of the test: set the quality from the file you have, not from a rule of thumb. If you do not know the source quality, compare the output with the input at 100 percent before you keep it.

Pixel difference at each quality

For each output we decoded both images to RGB and computed PSNR, the peak signal-to-noise ratio. Higher means closer to the input. It is a summary number, not a verdict, which is why the next section is a visual check.

Qualitymonarchsunflowerchess-set
9043.35 dB44.71 dB42.60 dB
7539.21 dB40.22 dB37.09 dB
5036.15 dB36.93 dB33.19 dB
2533.92 dB34.74 dB31.58 dB

The chess set loses the most at every quality. It has hard dark edges against a light background, which is the pattern a lossy encoder handles worst. The sunflower holds up best, because a field of fine texture hides small errors better than a clean edge does.

Where the loss became visible

We cropped 200 by 200 pixels at 100 percent from the same spot on each image, scaled each crop 3 times with nearest-neighbor, and looked at the original beside the output. The figure shows the monarch crop at quality 25, the worst case in the test.

Two crops of a monarch butterfly wing at 100 percent, scaled 3 times: the original on the left, the quality 25 WebP on the right.
Left: the input. Right: quality 25. The white spots lose their crisp edge, the thin black line along the wing turns ragged, and the orange gradient flattens. Photo: sbmeaper1, CC0. Crops and scaling by the test.
  • Quality 90: no difference visible on any of the three, at 100 percent or at page size.
  • Quality 75: no difference on the monarch at a glance. The sunflower's seed head loses a little of its finest texture in the center. The chess pieces' dark edges look slightly softer when the crops sit side by side.
  • Quality 50: visible at 100 percent on all three. The monarch's small white dots lose their shape, the sunflower center smooths into a mass, and the chess edges smear.
  • Quality 25: obvious at 100 percent and still visible at page size. The white dots merge into blobs, the flower texture turns soft, and the dark edges look painted.

The judgment is ours, made by eye on one monitor, and it is the part of this guide you should repeat for your own photo. The byte counts and the PSNR values are the measurements that back it.

What to pick

  • Start at 75 for a photo that is already compressed. In this test it cut 16.5 to 28.3 percent, and the difference was hard to see on two of the three.
  • Use 50 when the image is large on the page and the bytes matter more than fine detail. The softness shows at 100 percent, not at normal reading distance.
  • Avoid 25 for hero images, product shots, or anything with small text. The loss is easy to see and does not come back.
  • Do not raise the quality above the source. A quality 90 pass grew every file here by about 20 percent.
  • Check the output at 100 percent before you publish. The page shows both sizes side by side after it runs, so this costs one look.

If you are choosing a format as well as a quality, the format guide covers when WebP, AVIF, JPEG, or PNG is the right container for the job.

Tested on

2026-11-17, against commit 0a0a237 on a local production build (Next.js 14.2.35). Browser: Chromium 159.0.8154.6 through Playwright 1.65.1 on Node 24.20.0. Host: Windows 10 desktop. Four qualities, three images, three runs each, 36 downloaded files. Sizes came from the files on disk, and the PSNR values came from a Python 3.10 script using Pillow 12.2.0 and NumPy 2.2.6.

Primary sources

Document sources and photo credits

This guide shows no full photo. The comparison figure uses a crop of the monarch photo. The three source files are CC0, and each credit below was checked on the file page on 2026-11-17.

  • Monarch Butterfly, by sbmeaper1: file page. The page label reads Public domain, and the page's embedded image metadata names the CC0 1.0 public domain dedication as the license. The site uses a 955 by 1024 WebP copy.
  • Sunflower, Common (Helianthus annuus), by ALAN SCHMIERER: file page. The page label reads Public domain, and the embedded metadata names the CC0 1.0 public domain dedication. The site uses a 1024 by 874 WebP copy.
  • Wooden Chess Set, by Alan Levine: file page. The page label reads Public domain. The site uses a 1024 by 683 WebP copy.

Related tools

Try it yourself

More guides