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.
| File | Pixels | Bytes | Author |
|---|---|---|---|
| monarch.webp | 955 by 1024 | 74,774 | sbmeaper1 |
| sunflower.webp | 1024 by 874 | 58,592 | ALAN SCHMIERER |
| chess-set.webp | 1024 by 683 | 118,066 | Alan 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
| Quality | monarch | sunflower | chess-set |
|---|---|---|---|
| Input | 74,774 | 58,592 | 118,066 |
| 90 | 91,160 (+21.9%) | 69,534 (+18.7%) | 142,086 (+20.3%) |
| 75 | 58,426 (-21.9%) | 41,982 (-28.3%) | 98,590 (-16.5%) |
| 50 | 41,616 (-44.3%) | 27,490 (-53.1%) | 56,738 (-51.9%) |
| 25 | 29,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.
| Quality | monarch | sunflower | chess-set |
|---|---|---|---|
| 90 | 43.35 dB | 44.71 dB | 42.60 dB |
| 75 | 39.21 dB | 40.22 dB | 37.09 dB |
| 50 | 36.15 dB | 36.93 dB | 33.19 dB |
| 25 | 33.92 dB | 34.74 dB | 31.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.

- 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
- web.dev: Choose the right image format: why lossy formats exist and when each one fits.
- Google: WebP compression study: the measured size comparison between WebP and JPEG that the format was designed around.
- MDN: Image file type and format guide: the browser-side description of WebP and the other formats this page can read.
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
- Compress Images: set a quality or a target size and download the result.
- Image Converter: convert between JPG, PNG, WebP, AVIF, and HEIC.
- EXIF Viewer: check a photo's metadata before you publish it.
- AI Alt Text Generator: write the description that goes with the image.