Guides

Image Compression, Explained Properly

Short, practical explanations of the choices that actually change a file's size — and the ones that only look like they do.

  • Compressing JPG

    The format most photographs arrive in. Lossy, so quality settings genuinely matter — and re-compressing an already-compressed file rarely helps.

  • Compressing PNG

    Lossless, which means it cannot trade quality for size. What actually works, and why a PNG often refuses to shrink.

  • Compressing WebP

    A modern format that already starts small, keeps transparency, and is supported by every current browser.

The Three Levers That Actually Reduce File Size

In rough order of how much they usually save.

1. Dimensions

The number of pixels is the largest factor in file size. Halving the width and height leaves a quarter of the pixels, and the file shrinks close to proportionally. A photo that is 4000 pixels wide but displayed at 800 is carrying twenty-five times more detail than it needs.

The useful question is not "how small can I make this?" but "how large will it actually be shown?". For a full-width image in a page layout, 1600 pixels is usually generous. For a thumbnail, 400 is plenty.

2. Format

For photographs, WebP is normally smaller than JPG at the same visible quality, and both are far smaller than PNG. For screenshots, diagrams and anything with sharp text, PNG usually wins — not only on size but on appearance, because JPG produces fuzzy fringing around letters.

A common mistake is storing photographs as PNG. A photograph saved as PNG can easily be five times the size of the same photograph saved as JPG, with no visible benefit, because PNG is preserving detail the camera never captured in the first place.

3. Quality

Only relevant for lossy formats. The relationship is not linear: the first 10% of reduction costs almost nothing visually, while the last 10% before the artefacts appear is where files get dramatically smaller. Somewhere between 70% and 85% is the usual sweet spot for photographs on the web.

If you are unsure, compress one image at three settings and look at them side by side at the size they will be displayed. Judging compression at 400% zoom is not a useful test, because nobody will look at the image that way.

Common Misconceptions

"Compressing a file again will make it smaller again"

Not reliably. Lossy formats lose a little quality each time they are re-encoded, but the file does not keep halving. It often stays about the same size, and sometimes grows. Always compress from the original when you can.

"Changing the file extension converts the format"

It does not. Renaming photo.png to photo.jpg does not change a single byte of the image data; it only makes the name wrong. Real conversion re-encodes the pixels, which is what the compressor does when you choose an output format.

"A lower quality setting always means a much smaller file"

Only for lossy formats, and only up to a point. For PNG the setting does nothing at all, because nothing is discarded. For JPG and WebP the savings flatten out as quality approaches zero while the damage keeps growing.

"Online compressors all upload your file"

Many do, which is why they have upload progress bars and file size limits. This one does not: it uses the browser's own image APIs, so the file never leaves your device. Disconnect from the internet after loading the page and it still works.