Guides

How to compress images without losing quality

· 6 min read

Most oversized images are not oversized because of the compression setting. They are oversized because they contain far more pixels than they will ever be shown at, and no quality slider fixes that.

Resize before you compress

An image displayed 800 pixels wide does not benefit from being 4000 pixels wide, except on high-density screens where roughly double the displayed size is enough. Going from 4000 to 1600 pixels removes about 84 percent of the pixels before compression has done anything at all. This single step usually matters more than every other adjustment combined.

Do the resize first and the compression second. Compressing at full resolution and then resizing throws away work and leaves compression artefacts baked into a smaller image.

Why generational loss matters

Lossy compression is not idempotent. Each save discards detail based on what is currently in the image, including the artefacts introduced by the previous save. Open a JPEG, make a small edit, save it, repeat a few times, and the degradation accumulates visibly even though every individual save used a high quality setting.

The practical rule is to keep the original and re-export from it, rather than editing exports. If you only have the export, accept that its current state is the best it will ever be and avoid further lossy saves.

What the quality slider is doing

It controls how aggressively fine detail is discarded. The relationship to file size is not linear: dropping from 100 to 85 often removes half the file for a difference almost nobody can see, while dropping from 60 to 45 saves much less and starts to be obvious.

QualityTypical use
95 to 100Wasteful for the web; keep for masters
80 to 90The usual sweet spot for photographs
65 to 80Acceptable for thumbnails and backgrounds
Below 65Visible on detailed images; fine for heavily blurred ones

Metadata is free to remove

Camera files carry EXIF data: model, settings, timestamps, and often GPS coordinates. It can be a surprising share of a small file, and for a web image it serves no purpose. Removing it shrinks the file and removes the location of wherever the photo was taken, which is worth doing before publishing regardless of size.

Judge it at display size

Compression artefacts are evaluated by zooming to 100 percent, which is not how anyone will see the image. Look at it at the size it will actually appear. A setting that looks poor at 400 percent zoom may be entirely invisible at the size it ships.

Doing a folder at once

The settings above only pay off applied consistently across everything you publish, which makes this a batch job. The compressor here runs in the browser: the files are read from disk into the tab, processed there, and written back out, so nothing is uploaded.

How to batch convert image files without uploading them: convert a whole folder to WebP, JPG or PNG in one pass.

How to batch compress images and see what each file saved: Light, Balanced and Strong levels, JPG or WebP, with the saving shown per file.

Frequently asked questions

What matters more, resizing or compressing?

Resizing, usually by a wide margin. Halving the width and height removes three quarters of the pixels before the encoder starts, which no quality setting can match.

Does re-saving a JPEG make it worse each time?

Yes. Each lossy save discards detail from whatever is currently there, including previous artefacts, so the damage accumulates. Re-export from the original rather than editing an export.

Should I strip EXIF data?

For anything published, yes. It removes bytes and it removes GPS coordinates. Keep it only on archival originals where the capture settings are useful to you.