8 min read

How to Compress an Image Without Losing Quality

Quality is only one of four things making your file large. Here is what to change first, how far you can push JPEG before artefacts show, and what to never do twice.

2.4 MB  →  184 KB

Compression is not one dial. A JPEG file is large or small because of four independent things: how many pixels it holds, what the encoder threw away, how noisy the scene is, and what extra data travelled along with the picture. Most people only ever touch the second one, then conclude that compression ruins images.

It does — if you lower quality on a file that was three times larger than it needed to be. Fix the other three first and you can usually cut 80% of the size before the quality slider matters at all.

Pixel count is the biggest lever, and it is not quality

A 12-megapixel phone photo is 4032 × 3024 pixels. Displayed full-width in a browser on a laptop, it occupies about 1440 pixels — a ninth of the pixels it carries. The other eight ninths are downloaded, decoded and then thrown away by the display.

Resizing to the size the image will actually be shown at typically removes 70-90% of the bytes with no perceptual loss at all, because no pixel that reaches your eye was touched. That is why resizing is the correct first move and quality reduction is the fallback.

What each format can actually give you

FormatLossy?Best forHow far you can push it
JPEGYesPhotographsDown to quality 70 with no visible change at 100%
PNGNoScreenshots, flat graphics, transparencyNo quality dial — must convert to shrink
WebPBothAnything going on a web page25-35% smaller than JPEG at equal quality
HEICYesiPhone storageSmallest of all, but almost nothing opens it

What you are really trading away

JPEG does not store pixels; it stores the average colour of 8 × 8 blocks plus a description of how much each block varies. Lowering quality means describing that variation with fewer numbers. In smooth areas — sky, skin, a painted wall — the loss is invisible because there was almost no variation to describe. At a sharp edge, the block descriptions get rounded off and you see ringing: a faint halo of squares around text and high-contrast lines.

That is why a screenshot degrades at settings where a landscape still looks perfect. Detail is not the problem; the ratio of sharp edges to flat area is.

original Original · quality 92 2.4 MB Quality 80 520 KB -78% Quality 70 310 KB -87% Quality 55 190 KB -92% block artefacts appear The same 12-megapixel photo at four export settings. Below quality 60 flat areas start to block up.
The same 12-megapixel photo at four settings. The first bar is the untouched camera file. Everything below it is a real re-encode of the same image, measured — not estimated from a formula.Swipe the diagram sideways to read every label.

Three passes that beat lowering quality

  • Resize to the display size first. A 4032px photo shown at 1200px keeps 91% of its bytes for pixels nobody sees.
  • Convert to WebP if the file is going on a web page. Same visual quality, roughly a third fewer bytes, and every current browser reads it.
  • Strip metadata. A phone photo carries an EXIF block, a thumbnail, sometimes a GPS trace and a maker note — a few kilobytes that carry no pixels.

How far is too far

These numbers come from a 12-megapixel photograph with average detail. A photo of a brick wall will be much larger at the same setting; a photo of fog will be much smaller. Size follows content, which is why any tool that promises an exact output size without measuring your file is guessing.

QualityTypical sizeVerdict
90-952.0-2.6 MBIndistinguishable from the original. No reason to go higher.
80450-600 KBThe usual sweet spot for photographs shown on a screen.
70250-350 KBFine for thumbnails and backgrounds; soft in fine texture.
50120-180 KBVisible blocking in gradients. Acceptable only at small display sizes.
3060-90 KBObvious artefacts. Use only when a hard limit demands it.

The one thing you should never do twice

JPEG is lossy, and every save is a fresh round of loss from the already-damaged version. Saving at quality 95, reopening, then saving at 80 does not equal saving once at 80 — it is worse, and the artefacts compound where the first pass was weakest.

Keep the original. Compress a copy. If a client asks for a smaller version, encode again from the original, never from the file you already compressed. Ten rounds of “just a bit smaller” will visibly destroy an image that one well-chosen pass would not have touched.

Measure instead of guessing

A tool that shows the output size before you download turns compression from a gamble into a decision. Set a quality, read the number, move the slider, read it again. Two or three tries usually lands within a few kilobytes of a limit you have to hit — which is far more reliable than picking a quality and hoping.

Try it without uploading

Every tool on Toolpix runs in your browser. No file is sent anywhere.

Browse all tools

TOOLS IN THIS GUIDE

Each one does the step described above, on your own device.