Skip to content
ImageDoctor
Guide8 min read

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.

QualityWhat you getUse for
95–100Barely smaller than the originalMasters, print, archiving
85–95Indistinguishable at any normal zoomPortfolio and product photography
75–85Indistinguishable at viewing sizeAlmost everything else
60–75Slight softening in detailed areasThumbnails, email, chat
Below 60Visible blocking and bandingOnly 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.

  1. Zoom to 100%Not fit-to-screen. Browser downscaling hides exactly the artifacts you are trying to see.
  2. Find the busiest areaHair, foliage, fabric weave, small text, or a hard edge against a flat sky.
  3. Drag the divider back and forthMotion makes differences far easier to spot than comparing two still images.
  4. 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:

  1. Edit — crop, straighten, colour. Always from the original file.
  2. Resize — dimensions save far more bytes than the quality slider ever will. See resizing without losing quality.
  3. Convert — choose the final format before the final encode.
  4. 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

80 suits most photographs. Images containing text or flat graphics need 85–90, or a lossless format. Check the result at 100% zoom rather than trusting a number.

PNG is already lossless, so re-encoding it saves little and can even make the file bigger. To make it meaningfully smaller, reduce the dimensions or convert it to WebP, which keeps transparency.

For the same visual quality WebP files are usually smaller, and WebP also supports transparency. JPEG remains the safer choice when you do not know what software will open the file.

With lossy formats, yes. Each encode discards detail from what is already a degraded copy. Keep the original and export once.

No. Every ImageDoctor tool runs inside your browser. The file never leaves your device, and there is no server that could receive it.

Tools in this article

All blog