How to compress images without losing quality
"Without losing quality" is not quite possible, and not quite necessary. Here is what compression really throws away, why 80 is the number you keep seeing, and how to hit an exact file size when a form insists on one.
Processed locally in your browserEvery guide promises compression "without losing quality". That is not really what happens. Lossy compression always throws something away — the trick is that it throws away the things your eye was never going to notice, and it is very good at picking them. A 4 MB phone photo can become 400 KB and look identical on the screen you are viewing it on.
So the honest question is not "how do I avoid losing quality" but "how much can I lose before anyone can tell". This guide answers that, and shows how to do it in the Image Compressor.
What compression actually removes
A JPEG, WebP or AVIF encoder breaks the image into blocks and describes each one as a set of frequencies — broad areas of colour first, fine texture last. The quality setting decides how much of that fine-detail tail is kept. Lower the setting and the encoder rounds off the high frequencies: film grain, skin texture, the subtle gradient in a sky.
This is why results vary so much by subject. A photo of a beach at sunset compresses beautifully — it is mostly smooth gradient. A screenshot full of 11px text compresses badly, because text is nothing but high-frequency detail, and blurring it is immediately obvious.
Which quality setting to use
| Quality | Looks like | Use it for |
|---|---|---|
| 95–100 | Indistinguishable, files barely smaller | Master copies, print, archiving |
| 85–95 | Indistinguishable at any normal zoom | Portfolio images, product photography |
| 75–85 | Indistinguishable at normal viewing size | Almost everything on the web |
| 60–75 | Slight softening on detailed areas | Thumbnails, email, chat |
| Below 60 | Visible blocking and banding | Only when a hard size limit forces it |
The default in ImageDoctor is 80, and for the overwhelming majority of photographs that is the right answer. The interesting part of the curve is between 60 and 85: going from 95 to 85 might halve a file with no visible cost, while going from 70 to 60 saves a little and starts to show.
Do not take that on trust. The compressor shows the original and the result side by side with a draggable divider, at full resolution. Zoom to 100% on the busiest part of the image — hair, foliage, fabric texture — and drag the divider back and forth. If you cannot see the seam move, you have found your setting.
Compressing an image, step by step
- Open the compressor and add your imagesDrag files in, paste from the clipboard, or click to browse. JPG, PNG, WebP, AVIF, GIF, BMP, TIFF and SVG are all accepted, and you can add several at once.
- Pick a modeQuality lets you choose the setting and see what size comes out. Target size fixes the size and finds the quality. Reduce by % aims for a share of the original.
- Choose an output formatLeave it on Auto for a sensible modern choice, or set WebP explicitly if you know the file is going on a website.
- Check the comparisonDrag the divider over the most detailed part of the image at full zoom. Adjust the slider until the seam disappears.
- DownloadOne image downloads directly; several come back as a ZIP. Nothing was uploaded at any point — the work happened in this tab.
Hitting an exact file size
Upload forms are unreasonable about this. "Passport photo, maximum 200 KB." "Attachment must be under 2 MB." Guessing at the quality slider until you land under the limit is tedious, so the compressor does the searching instead.
Switch to Target size, type the number, and ImageDoctor binary-searches the quality setting for the highest value that still fits under your limit. If quality alone cannot get there — and for a very large photo squeezed into 100 KB it often cannot — it reduces the pixel dimensions too, because file size scales roughly with pixel count. Turn on Preserve dimensions if the pixel size must not change and you would rather accept lower quality.
Why your compressed PNG got bigger
PNG is lossless. There is no quality dial, because nothing is discarded — it is a clever way of writing down the exact pixels. Re-encoding a PNG that was already well optimised can easily produce a slightly larger file, which feels like the tool is broken but is simply what lossless means.
There are only two real ways to make a PNG smaller: reduce its dimensions, or stop using PNG. Converting a screenshot to WebP typically halves it with no visible change, and WebP keeps transparency, so it is a drop-in replacement in almost every case.
ImageDoctor watches for this. If a compressed file comes out larger than the original, the export panel offers to keep the untouched original instead, under the new filename — so a batch never quietly makes your images worse.
Compressing a lot of images at once
The compressor itself takes multiple files and applies one setting to all of them. For anything more involved — resize and compress and convert and watermark in one pass — use Batch Image Tools, which runs the whole chain across the queue and hands back a ZIP.
If the goal is simply "make these ready for my website", Image Optimizer is the shortcut: it caps the dimensions, picks a modern format and strips metadata in a single pass, with sensible defaults already chosen.
A short checklist
- Photographs: WebP or JPEG at quality 80. Start there, adjust only if the comparison tells you to.
- Screenshots and graphics with text: WebP, quality 85–90, or PNG if it must stay lossless.
- Anything with transparency: WebP or PNG. Never JPEG — it flattens transparency onto a background colour.
- Resize before you compress. Dimensions save far more bytes than the quality slider ever will.
- Keep the original. Compression is one-way, and re-compressing an already compressed file compounds the damage.
Common questions
Tools in this guide
Keep reading
- JPG vs PNG vs WebP vs AVIF: which image format should you use?A practical comparison of the four formats that matter, what each one is genuinely good at, and how to convert between them without losing transparency.
- Optimising images for a faster websiteImages are usually the heaviest thing on a page. A practical workflow for dimensions, format, quality and metadata — plus the HTML that stops layout shift.
- How to resize images without stretching, cropping or blurring themExact size, percentage or bounding box — which resize mode to use, what contain, cover, fill and inside really do, and why upscaling can't add detail.