CompressDog

Every Measurement Behind This Site, in One Place

Eleven studies across 5,848 files - chroma subsampling, presets, WebP round trips, bad-JPEG recovery, progressive mode, metadata, resize, PNG palettes, quality.

Most compression advice is written by people who did not measure anything. We did, and this page collects the results so you can check them rather than take our word for it.

Eleven studies, 5,848 image files, one metric throughout: SSIMULACRA2 against the original. Every chart below is drawn from the raw numbers, and the scripts that produced them are described at the end. If you want to check the numbers rather than take our word for it, the underlying data is downloadable.

The preset question

Our compression page used to default to a setting called Balanced, which uses Mozjpeg's tuned quantisation tables. The captions under the buttons promised savings of roughly 3% and 5-10%. Those figures came from six images.

We re-ran it on 320.

Mean file size at each preset, quality 90

The tuned table is not a free win. It costs about 8% more bytes than the standard tables at the same slider position, and its measured score is slightly lower. The only preset that buys something real with its extra bytes is jpegli, and what it buys is quality rather than size.

That is why the default is now the standard tables. The full write-up, including the two captions that turned out to be wrong, is here.

Does the tuned table earn its keep somewhere else

The tuned tables exist for a reason, and the reason is heavy compression. So we tested the rest of the curve rather than extrapolating from quality 90.

Mean file size across the quality range

Below quality 60 the tuned tables do produce smaller files, by 1.4% to 2.9%. Above 60 they lose on size as well as score. The lines cross somewhere between 50 and 60.

Mean measured quality across the same runs

The score line does not cross anywhere. Standard tables score higher at q40, q50, q60, q70 and q90.

So "designed for heavy compression" means smaller at the same nominal setting, not better. The full curve test is here.

What chroma subsampling actually costs

This is the setting that damages more compressed photos than any other, and it is applied by default in almost every online tool before the quality slider is consulted.

We took 323 images, re-encoded each one twice at the same quality with only the sampling changed, and scored both against the original. Every single image scored worse at 4:2:0. The mean fell from 87.82 to 82.68, and the files were 22.1% smaller.

That is a real trade, not a hidden defect, and the measurements and method are here.

PNG: the one case with a guarantee

JPEG cannot promise that your pixels survive. PNG recompression can, so we tested whether it holds.

261 real PNG files, recompressed with the same oxipng call the site uses, then decoded and compared to the original pixel by pixel. Every file got smaller, none grew, and the mean saving was 12.68%.

Eight files came out with different bytes. All eight had transparency, and in every one, zero visible pixels changed: the difference was colour stored underneath fully transparent areas. The PNG study is here.

The WebP detour

Converting to WebP and back is the conversion with the worst reputation and the least data behind it, so we measured it.

320 JPEGs went down two paths. One re-encoded straight to JPEG at quality 90. The other encoded to WebP at 90 first, then decoded and encoded to JPEG at 90. Same final format, same quality, same encoder. The only difference was the WebP step.

That step cost 8.20 points on average, and it was worse on all 320 images. The returned JPEG was also 9.4% smaller than the control, which is the part that fools people: it is smaller because it has less in it.

For scale, dropping chroma subsampling costs about 5 points on the same metric. The full write-up is here.

The one that surprised us most

"Just re-encode it at higher quality" is advice you see everywhere. We tested it on 320 photos: take a JPEG at quality 45, then re-save it at 90.

The re-encode made every single image slightly worse, by 0.43 points on average, and almost doubled the file size, from 96.3 KB to 183.7 KB. It still sat 20.5 points below a clean encode from the original.

Raising quality on a file that has already lost detail does not recover it. It spends bytes describing the damage more precisely. The full write-up is here.

The one that cost nothing

Progressive JPEG is a checkbox in every export dialog and nobody tells you what it does. We encoded 320 photos twice, changing only that flag.

The files came out 6.27% smaller, and the decoded pixels were byte-identical in all 320. That is not a coincidence. Progressive and baseline write the same DCT coefficients in a different order, so the size win comes from the entropy coder and the image is untouched.

The bill is decode time, 5.67 ms to 14.26 ms per image. The full write-up is here.

The metadata audit

Everyone says to strip metadata and nobody says what it saves. We walked the segments of 4,000 real JPEGs and compared pixels before and after.

726 had removable metadata, and the median saving was 857 bytes, which is less than the folklore suggests. But the tail is real: 24 files lost more than half their size, and the worst lost 88%. All 726 decoded to byte-identical pixels.

The interesting part was what we nearly got wrong. Our first version also removed APP2, which is the ICC colour profile, and the pixel test passed on every file anyway, because a colour profile does not change pixel values, only how they are displayed. Two traps like that are documented in the write-up.

Resize or compress

The most repeated piece of compression advice is "reduce the resolution instead of the quality". It is right in one situation and wrong in the other, and we measured both sides.

At a fixed 768 px display size, 320 images pushed into a 120 KB budget scored better at full resolution than at three quarters or half. Half resolution lost 13.98 points and did not win a single case, even when allowed to use quality 95.

Scored at their own size instead, the half-size files were the best of the three by a wide margin. The decision is entirely about whether the display size shrinks with the file. The full write-up is here.

How many colours a PNG needs

PNG has a lossless mode and a palette mode, and the palette mode is a fifth of the size. We measured what it costs on 181 real PNGs.

The first thing we found is that every one of 37 game assets was already under 256 colours, median 143. They had been palettised before we got them, so reducing them again does nothing at all.

Everything else had 48,000 to 163,000 colours. Dropping those to 256 removed 56 to 79 percent of the bytes and cost 10 to 15 points. The rule we ended up with is just three bands on the colour count, and the write-up has them.

The same number, two encoders

Quality 80 in one application and quality 80 in another do not produce the same file. The number is an index into a quantisation table, and each encoder ships its own.

On 320 images, mozjpeg produced files 13 to 14.5 percent smaller than libjpeg at every setting we compared, and scored 1 to 2.4 points lower. The size advantage held steady. The quality cost shrank as the setting went up.

The write-up has the table and what to do about it when you switch tools.

Finally, the metadata question

Everyone warns that photos leak your location. We parsed 1,086 JPEGs with a proper EXIF reader, cross-checked the count with an independent library, and found almost no usable GPS data at all.

What we did find is that metadata is usually tiny (568 bytes, 0.21% of the file) and occasionally enormous. One file in the set was 90.7% metadata by weight. The full analysis is here.

What these numbers changed

Measurements are only worth publishing if they change something. Ours did:

Method notes

Every study resizes the reference to 768 px on the long edge before encoding, so results are comparable across pages. The quality sweep reuses the reference images from the preset study rather than regenerating them, which is why both pages agree exactly.

Scores come from SSIMULACRA2, which tracks human judgement well on average. "On average" is doing real work in that sentence, so treat a 0.5-point difference as noise and a 2-point difference as real.

Two of the four studies use image libraries from one machine. They are honest samples, not representative ones, and each write-up says so.

If you run any of this against your own files and get a different answer, we want to know. A contradiction with a concrete example is more useful to us than agreement, and the address is on the about page.

Sources

Open the compressor