17 MB of images became 1.2 MB — and what that means in sales
The seven images in our portfolio weighed 17 MB. The fix was not better compression: it was changing format and measuring fidelity instead of guessing at quality.
We inherited seven PNGs of 2 to 2.8 MB each. Together, 17 MB. A single portfolio page loaded 7.5 MB of images.
The first attempt was the obvious one: recompress the PNGs. The result was the opposite — the files got bigger. PNG is a lossless format, and those were already well compressed. There was nothing to gain there.
The gain was in changing codec. We converted to AVIF, with WebP and JPEG as fallbacks for browsers that do not support the first. Same resolution, 1536 × 1024. Not one pixel less.
The part that changed the result was how we chose the quality. Instead of fixing "quality 80" for everything, we measured: for each image, at each width, we looked for the lowest quality that still reaches 40 dB of PSNR — the point where the difference stops being perceptible. One of the photos fit at quality 50; another needed 80.
Fixed quality is a guess. Either you degrade an image that did not need it, or you carry weight nobody notices.
The result: the marketing page went from 7.5 MB to 126 KB on mobile. Fifty-nine times lighter.
What that means commercially: on an ordinary 4G connection, 7.5 MB takes more than ten seconds. Half the people give up before that. It is not a developer metric — it is half the visitors who never saw the work.
We also found that WebP did not reach 40 dB on one of the images even at maximum quality, while AVIF got there at a quarter of the size. It is the kind of difference that only shows up when you measure.