Skip to main content
FixMyTech

How to Compress an Image With No Quality Loss at All

By

Published

7 min read

Share

Short answer

Genuinely lossless compression — stripping metadata, reducing a PNG's colour palette, and re-encoding with a better compressor — shrinks screenshots and graphics by 20–50% without changing a single pixel. For photographs it barely helps, because JPG has already discarded the redundancy. There, "visually lossless" at 90% quality is the honest goal.

On this page

“Without losing quality” gets used two ways, and conflating them is why image compression advice so often disappoints.

Truly lossless means the decompressed image is identical to the original, pixel for pixel. It is verifiable and it is not a matter of opinion.

Visually lossless means information was discarded, but information your eye cannot resolve at normal viewing distance. It is a judgement call, and it is what most tools mean when they promise no quality loss.

Both are legitimate. Knowing which one you are getting tells you what is actually possible, and the answer differs sharply between photographs and graphics.

Where lossless genuinely works

Lossless compression finds exact redundancy — repeated pixel values, repeated patterns — and encodes it more compactly. That makes it effective on images with large areas of identical colour and sharp edges:

  • Screenshots of applications and websites
  • Logos, icons and diagrams
  • Charts and line art
  • Anything with flat colour or transparency

On these, three lossless operations routinely recover 20–50%:

Palette reduction. A screenshot may use only a few hundred distinct colours while being stored as 24-bit RGB with capacity for 16 million. Converting it to an indexed PNG with an exact palette is lossless when the colour count fits, and it can halve the file.

Better compression. PNG’s format allows different encoders to produce different sizes from identical pixels. Tools like OxiPNG and Zopfli try harder than the encoder in most image editors, typically finding another 10–25%.

Metadata stripping. Camera files carry EXIF data — exposure, lens, camera model, and frequently GPS coordinates. Usually tens of kilobytes, occasionally more when an embedded preview thumbnail is present.

WebP lossless is worth knowing about as a format choice: it reconstructs the image exactly and is typically 25% smaller than even an optimised PNG. Every current browser supports it.

Where lossless barely helps

Photographs. The reason is structural rather than a limitation of the tools.

A photograph has almost no exact redundancy — sensor noise, lighting gradients and texture mean adjacent pixels differ slightly nearly everywhere. Lossless compression has very little to find.

Worse, if the photo is already a JPG, the lossy step has already removed the redundancy that existed. Re-compressing losslessly finds nothing, and saving it as a PNG produces a file three to eight times larger with no benefit whatsoever.

This is the single most common mistake in image compression: reaching for PNG to “preserve quality” on a photograph. The quality was already fixed when the JPG was made; PNG only preserves the JPG’s artefacts at great expense.

The honest option for photographs

For photographs, visually lossless is the realistic target, and it works well.

JPG at 90% quality is indistinguishable from the original in any normal viewing context while being substantially smaller. At 85% the difference remains imperceptible on most images. The 75–85% band is where most web images should sit, and the practical reasoning is in how to compress images without losing quality.

Two rules that matter more than the setting:

  1. Never re-save a JPG. Every save re-encodes and compounds the previous losses. Keep the original — camera file, PNG, or PSD — and export a fresh JPG each time.
  2. Compress once, at the end. After cropping, colour adjustment and resizing, never before.

There is one genuinely lossless operation available on JPGs: lossless rotation and cropping to multiples of 8 or 16 pixels, which some tools support by manipulating the encoded blocks directly rather than decoding and re-encoding. Niche, but real.

The step that beats both

Resizing is not compression, and it is almost always the larger win.

File size scales with the square of the dimensions. Reducing a 4000-pixel photo to the 1200 pixels it will actually be displayed at removes about 91% of the data. No quality setting produces a reduction like that, and at the display size nothing is visibly lost.

The correct sequence for anything going on the web:

  1. Resize to the display dimensions.
  2. Choose the format by content — JPG for photos, PNG or WebP for graphics.
  3. Compress — lossless for graphics, 80–85% for photographs.
  4. Strip metadata if publishing.

Our image compressor does steps 1 to 3 in one pass, in your browser. For step 3 on a graphic, choose PNG output and it stays lossless; choose WebP or JPG and you are trading quality for size deliberately.

When lossless is not optional

Some images should never be lossily compressed:

  • Screenshots containing text. Documentation, error messages, UI references. JPG damages exactly the part people need to read — the sharp edges of letters.
  • Line art, diagrams and charts. Hard edges and flat colour are where JPG looks worst and PNG compresses best.
  • Images you will edit again. Every intermediate save should be lossless.
  • Medical, scientific or legal imagery. Artefacts can be mistaken for content, and altered pixels can matter evidentially.
  • Archival originals. Keep one untouched copy. Storage is cheap; the original is not recoverable.

For all of these, PNG is the safe default — and PNG optimisation gives you real savings without any of the risk.

Checking whether it worked

For a claimed-lossless operation, you can verify rather than trust:

  • Compare file hashes of the decompressed images if your tool exposes them.
  • Or simply check the colour count and dimensions are unchanged.

For visually lossless, view at 100% zoom — not fit-to-screen — and look at the places artefacts appear first: smooth gradients like skies, flat shadow areas, and edges between strongly contrasting colours.

Judging compression at 400% zoom tells you nothing useful, because nobody will view it that way.

What does not work

  • Zipping images. JPG, PNG and WebP are already compressed. A zip saves almost nothing and makes the files harder to use.
  • Saving a photograph as PNG to preserve quality. Several times larger, and it preserves the existing JPG artefacts rather than any lost detail.
  • Converting PNG to JPG for a screenshot. Smaller, visibly worse, and not reversible. Optimise the PNG instead.
  • Running several lossy compressors in sequence. Generation loss compounds while savings do not.
  • Upscaling then compressing. Adds file size without adding detail. AI upscaling invents plausible detail rather than recovering real detail.

Frequently asked questions

Is there such a thing as truly lossless image compression?
Yes. PNG, WebP and AVIF all have lossless modes that reconstruct the original pixel-for-pixel. Optimising a PNG by reducing its palette and stripping metadata is genuinely lossless and often saves 20–50% on screenshots and graphics.
Why does lossless compression barely help my photograph?
Because a photograph has almost no exact redundancy — adjacent pixels differ slightly everywhere. Lossless compression finds repeated patterns, and there are few. If the photo is already a JPG, the lossy step has also removed what redundancy existed.
What does visually lossless mean?
That the compression discards information the eye cannot resolve at normal viewing distance, so the result is indistinguishable in practice while not being identical pixel-for-pixel. For photographs at 90% JPG quality this is a reasonable description.
Does converting PNG to WebP lose quality?
Not if you use WebP's lossless mode, which reconstructs the image exactly and is typically 25% smaller than an optimised PNG. WebP also has a lossy mode, so the setting matters — check which one your tool is using.
Should I keep the original after compressing?
Always, for anything you might edit again. Lossy compression is irreversible and each subsequent save compounds the damage. Keep one untouched original and export fresh copies from it.
Does stripping EXIF data reduce file size?
Modestly — usually 10–100KB per file, occasionally more if the camera embedded a preview thumbnail. It also removes GPS coordinates, which matters more for privacy than for size when publishing photos.

All Images guides