Compressing JPEG, PNG and WebP without losing visible quality
Most compression advice stops at "use quality 80". That works for photographs and quietly ruins screenshots. Here is what each format throws away, what the damage looks like, and the setting to reach for in each case.
Processed locally in your browser"Without losing quality" is doing a lot of work in that phrase. Lossy compression always discards something; what makes it useful is that it discards things your eye is bad at noticing. The goal is not zero loss — it is loss you cannot see at the size the image will actually be viewed.
Which loss is invisible depends entirely on the format and the picture. This guide goes format by format. If you want the general walkthrough of the tool instead, read how to compress images without losing quality.
The one idea behind all of it
Lossy encoders break an image into blocks and describe 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 survives. Lower it and the encoder rounds off high frequencies — film grain, skin texture, the gradient in a sky.
This is why the same setting behaves so differently on different pictures. A sunset is mostly smooth gradient, so it compresses beautifully. A screenshot full of 11px text is nothing but high-frequency detail, and softening it is instantly obvious.
JPEG
JPEG is nearly thirty years old and still the safest thing to hand someone. It has no transparency and no lossless mode, so every save is a fresh round of loss.
| Quality | What you get | Use for |
|---|---|---|
| 95–100 | Barely smaller than the original | Masters, print, archiving |
| 85–95 | Indistinguishable at any normal zoom | Portfolio and product photography |
| 75–85 | Indistinguishable at viewing size | Almost everything else |
| 60–75 | Slight softening in detailed areas | Thumbnails, email, chat |
| Below 60 | Visible blocking and banding | Only under a hard size limit |
The artifacts to look for are 8×8 blocks in flat areas and mosquito noise — a shimmer of speckles hugging high-contrast edges. Both show up first around text and around a dark object against a bright sky.
PNG
PNG is lossless. There is no quality dial because nothing is being thrown away — it is a compact way of writing down the exact pixels. That has a consequence people find surprising: re-compressing an already optimised PNG can produce a slightly larger file.
There are only two honest ways to make a PNG smaller. Reduce its dimensions, or stop using PNG. A screenshot converted to WebP is typically a fraction of the size with no visible change, and WebP keeps transparency, so it is a drop-in replacement almost everywhere.
ImageDoctor watches for the failure case: if a compressed file comes out bigger than the original, the export panel offers to keep the untouched original under the new name, so a batch never quietly makes your images worse.
WebP
WebP has both a lossy and a lossless mode, supports transparency, and is supported by every current browser. For web work it is the format to reach for by default.
- Photographs: lossy WebP at quality 80. It generally beats a JPEG of the same visual quality by a useful margin.
- Screenshots and UI captures: lossy WebP at 85–90 usually holds text crisply and is far smaller than the PNG it came from.
- Logos, icons, flat illustration: lossless WebP or PNG. Flat colour is exactly what lossless compression is good at.
- Anything with transparency: WebP handles it. JPEG cannot.
One caveat: WebP's lossy mode uses chroma subsampling, so fully saturated reds and blues against a contrasting colour can shift slightly. On a red logo it is worth a look at 100% before you commit.
AVIF
AVIF usually produces the smallest file of the four at a given visual quality, and handles gradients particularly well — banding in skies is much less of a problem. The costs are encoding time, which can be noticeably slower in a browser, and support in older software outside the browser.
It is a good choice for large hero images on a site you control. It is a poor choice for a file you are emailing to someone, because you cannot be sure what they will open it with.
How to actually judge the result
Numbers do not tell you whether an image looks right; your eyes do, at the right zoom. The Image Compressor shows the original and the result side by side with a draggable divider at full resolution.
- Zoom to 100%Not fit-to-screen. Browser downscaling hides exactly the artifacts you are trying to see.
- Find the busiest areaHair, foliage, fabric weave, small text, or a hard edge against a flat sky.
- Drag the divider back and forthMotion makes differences far easier to spot than comparing two still images.
- Lower the quality until you see the seam, then go back one stepThat is your setting for this image. Similar images from the same camera can reuse it.
Order of operations
When several things need to happen to the same image, the order changes the result:
- Edit — crop, straighten, colour. Always from the original file.
- Resize — dimensions save far more bytes than the quality slider ever will. See resizing without losing quality.
- Convert — choose the final format before the final encode.
- Compress — once, at the end.
Running four separate tools in sequence re-encodes the file four times, which compounds the loss. Batch Image Tools applies the whole chain in one pass and exports a ZIP, which is both faster and kinder to the image.
Mistakes that cost quality for nothing
- Compressing a photo that is still 6000px wide instead of resizing it first.
- Saving screenshots as JPEG. Text and JPEG are a bad match; use WebP or PNG.
- Re-compressing a file that has already been compressed once. Go back to the original.
- Trusting a thumbnail preview. Judge at 100%.
- Throwing the original away. Compression is one-way.
Common questions
Tools in this article
Keep reading
- How to compress images without losing qualityWhat image compression actually discards, which quality setting to use, and how to hit an exact file size in KB or MB — step by step, in your browser.Guides
- How to reduce image file size for websitesRealistic size budgets for hero images, thumbnails and logos, the order of operations that gets there, and what to do in WordPress, Shopify and static sites.
- How to resize an image without losing qualityWhy downscaling is safe and upscaling isn't, how to keep a resized image sharp, the DPI myth, and the right order to resize, convert and compress in.