How to compress images without losing quality
The short answer
Compress after resizing, not before. Use JPG (or WebP) for photographs. Aim for a quality setting around 75–85%. Compare the result to the original at full zoom — if you can’t tell the difference, you haven’t lost meaningful quality, no matter how much smaller the file got.
“Lossy” doesn’t mean “lower quality” — up to a point
Most photo compression is lossy, meaning some image data is permanently discarded to reduce file size. That sounds like a straightforward trade-off, but in practice, a well-compressed image and the original are often visually indistinguishable — because a lot of the data a camera captures is redundant information the human eye barely registers anyway.
The goal of compression isn’t “smaller at any cost.” It’s finding the point where you’ve removed the invisible redundancy and stop before you start removing anything you’d actually notice.
Where visible quality loss actually comes from
Quality problems during compression tend to come from a small number of specific causes, not compression itself:
Compressing too aggressively. Every format has a point of diminishing returns. Below roughly 70% quality on a typical JPG, artifacts — blocky patches, especially in skies and other flat-color areas, or fuzzy halos around sharp edges — start becoming visible.
Compressing an already-compressed file, repeatedly. JPG compression is lossy, so information is discarded each time a file is saved. Open a JPG, make a small edit, save it as JPG again, and repeat that cycle a few times, and quality degrades noticeably — even at a high quality setting each time. Always compress from the original file, not from a previously compressed copy.
Compressing at the wrong dimensions. A 4000-pixel-wide photo compressed to a “reasonable” file size will still look soft once displayed at 800 pixels wide, because the compression algorithm was working with far more detail than the final display needs — and often makes worse trade-offs as a result. Resizing first gives the compression algorithm a cleaner job.
Using the wrong format. As covered in the format guide, PNG’s lossless compression can’t shrink a photograph nearly as effectively as JPG or WebP can — so “compressing” a photo saved as PNG often yields disappointing results no matter how hard you try.
A practical process
1. Resize first. Bring the image down to the largest size it will actually be displayed at. Compressing a huge image and then resizing it wastes the compression work, since resizing re-encodes the image anyway. See the image size guide for target dimensions by use case.
2. Choose the right format. Photographs compress far better as JPG or WebP than PNG. If your source file is PNG and doesn’t need transparency, converting it during compression often produces a dramatically smaller result.
3. Compress in the 75–85% quality range as a starting point. This range consistently produces files that are visually identical to the original for most photographs while cutting file size substantially.
4. Compare before trusting the result. Zoom to 100% and look at the areas most likely to show artifacts first — skies, skin tones, and anywhere with a smooth gradient. If it looks clean there, it’s clean everywhere.
5. If you need it smaller, reduce dimensions before dropping quality further. Past a certain point, going from “85% quality” to “60% quality” produces a much bigger visible difference than shaving another 10% off the dimensions.
What to expect from automatic compression
Tools that compress automatically — including the compression tool — are tuned to sit inside that “invisible redundancy” range by default, so in most cases you can drop a file in and trust the result without manually tuning quality percentages. That said, the process above is worth understanding for the cases where you want more control, such as an already-small file that needs to shrink further, or a very detail-heavy image (fine text, dense patterns) where the default settings feel too aggressive.
Common mistakes
Judging quality from a thumbnail. Artifacts are often invisible at small display sizes and only show up when the image is viewed at full size or zoomed in.
Re-saving the same file over and over. Each pass through lossy compression costs a little quality. Keep an uncompressed original and always compress from it.
Compressing screenshots and graphics the same way as photos. Flat-color images with text or sharp edges compress and display very differently — see the format guide for why PNG usually serves these better.
Quick reference
- Resize before you compress, not after
- JPG/WebP for photos, not PNG
- 75–85% quality is the sweet spot for most photographs
- Always compress from the original — never re-compress a compressed file
- Check the result at 100% zoom, focusing on skies and gradients first