TabGarden

Guides

Image Quality vs File Size: What the Quality Setting Does

How JPG and WebP quality settings from 30 to 95 change file size and look, measured on 12 CC0 photos and 3 synthetic screenshots.

Almost every image editor, export dialog and compression tool has a quality slider for JPG and WebP. It is easy to guess what it does in general (lower number, smaller file, worse picture), but much harder to know how much each step costs or saves. This guide answers that with measurements: we saved the same images at quality 30, 50, 75, 85 and 95 in both formats and recorded the sizes and how far each result drifted from the original.

What the quality number actually controls

JPG and lossy WebP do not store an image pixel by pixel. They describe small areas of the picture as combinations of patterns, and then round those descriptions off. The quality setting controls how coarse that rounding is. At high quality the rounding is gentle and the decoded image is very close to the original. At low quality much of the fine detail is rounded away to zero, which saves space but leaves visible traces called compression artifacts.

In web browsers, the quality value is a number between 0.0 and 1.0, as described for toBlob() in the HTML standard's canvas section. TabGarden's Compress Image slider shows 30 to 95 and divides by 100 before passing it on, so "75" in the tool is 0.75 to the browser.

Two important consequences follow from how this works:

How we measured

All numbers here come from a test run on 28 November 2026.

Sizes are in KB (1 KB = 1024 bytes). Each line gives the median of the set and, in brackets, the smallest and largest result.

Results for photos

As a reference, the same 12 photos saved as lossless PNG had a median of 4,352 KB (2,332 to 6,967 KB).

JPG:

WebP:

Results for screenshots

The three screenshots saved as PNG had a median of 253 KB (157 to 309 KB).

JPG:

WebP:

What the numbers show

The top of the scale is expensive

Going from 85 to 95 almost doubled the size of a photo: the median growth was 1.89 times for JPG and 2.02 times for WebP. Going from 75 to 95 multiplied the JPG size by 2.59 (range 2.14 to 3.62) and the WebP size by 3.09 (2.04 to 5.76). Those last steps do bring the file closer to the original (about 4.3 dB of PSNR for JPG between 85 and 95), but at 85 the JPG photos were already fairly close to the original (median 37.2 dB), so the last 10 points buy a modest gain for twice the bytes. For sharing and for web pages, settings above 90 rarely pay off; keep them for images that will be edited further or printed.

The bottom of the scale saves less than you might expect

From 50 down to 30, a JPG photo shrank only to about 70% of its size (the 30 to 50 step was a median 1.43 times growth in the other direction). WebP behaved similarly. In other words, the last 20 points of quality you give up buy relatively little space, while the measured distance from the original keeps growing (median JPG PSNR 33.2 dB at 50, 31.6 dB at 30). If a file is still too big at 50, lowering the pixel dimensions usually works much better than going to 30; see shrinking photos for upload limits for measured examples.

Content matters more than the setting

At JPG quality 75, the largest photo was more than six times the size of the smallest (800 KB against 130 KB), even though all were 2000 pixels wide. The large files were the river rapids, the mountain panorama, the mushroom and the capybara, all full of fine, irregular detail. The two smallest were the goose close-up and the living room interior. These same detailed photos also had the lowest PSNR at every setting: fine texture is exactly what lossy compression removes. So there is no quality number that produces "about 300 KB" for every photo. Check the result for each image.

WebP is usually smaller, but not at every setting

At quality 75, WebP was smaller than JPG on all 12 photos, with a median of 68% of the JPG size. At quality 30 and 50, however, the four most detailed photos came out larger as WebP than as JPG. In those four cases WebP was also clearly closer to the original (for the river rapids at quality 30: 27.2 dB for WebP against 23.6 dB for JPG). The encoders simply interpret the number differently: at the low end, this WebP encoder kept more detail than the JPG encoder at the same setting.

For screenshots the difference was larger and consistent. WebP was 45 to 73% of the JPG size at every quality, and at the same time closer to the original at every quality. For screenshots and other images with text, WebP had the clear advantage in this test. (The format comparison guide covers when PNG is still the right choice.)

What the artifacts look like

These descriptions are our visual impressions from enlarged crops (one photo and one synthetic screenshot, shown at twice the size) at quality 30, 50, 75 and 95. They are observations, not measurements; the crops can be regenerated with the measurement script in the site's research folder.

JPG

WebP

When artifacts show up most

Practical settings

Always judge the result at the size it will actually be seen. A setting that looks poor at 200% zoom can be perfectly fine at the size of a chat bubble.

Trying it yourself

Compress Image lets you set the quality between 30 and 95 and choose JPG or WebP. Each result shows the size before and after, and you can run it again with another setting to compare. The tool never returns a file larger than the one you gave it; if a high setting would grow the file, you get the original back. Everything runs inside your browser, so your images are not uploaded.

Limits of this test

The sizes come from one browser engine (Chromium 129). Other browsers and programs use different encoders and will produce different numbers for the same setting. The photos were already JPG files downloaded from Wikimedia Commons, not raw camera output, and the screenshots were synthetic. PSNR is a measure of numeric difference and does not capture everything a person notices. Treat the figures as a guide to proportions, not as exact predictions for your own images.