The Observation

A performance audit flagged the homepage banner as too heavy. The large version was 224KB, the small one 90KB, and the report suggested re-encoding at a lower quality setting. The obvious move was to take the image already on the site and compress it again.

That file was itself a compressed export. The originals had been deleted from the repository weeks earlier, when the site switched image formats, on the reasonable assumption that nobody would need them again. They were still sitting in version history. So instead of squeezing the export, I pulled the originals back out and encoded fresh from those.

What It Saved

At quality 65, the large banner went from 224KB to 167KB and the small one from 90KB to 70KB. The three other large images on the page each came down by roughly a quarter. Side by side, cropped and zoomed, the old and new versions were indistinguishable.

The audit had hoped for about 40KB on the small banner. That number wasn't reachable at a quality worth shipping, and I'd rather say so than chase it into visible artifacts.

Why the Source Matters

Lossy compression throws detail away and fills the gap with an approximation. Compress that result again and the encoder treats the approximation as if it were the real picture, then throws more away on top of it. Each pass stacks new loss on old loss. To hold the same visual quality after a second pass, you usually have to spend more bytes, not fewer, which works against the whole point.

Starting from the original gives the encoder the full picture to work with, so it can decide what to discard once, with nothing already missing.

The Habit

Keep the source files somewhere, even when the site only serves the compressed ones. If they've already been deleted, check version history before settling for a second-generation encode. The original is usually still there, and it's the only file that can give you a smaller image without giving up quality.

Compress Once, From the Source.

Page weight is one of the details covered in our web and digital work.

Get a Performance Check