1. Home
  2. Guides
  3. Lossy vs Lossless Image Compression Explained

Lossy vs lossless image compression

Updated November 20, 2026

Every smaller image file is the result of one of two ideas: storing the same data more cleverly, or storing less data. Knowing which one you are using explains most results.

The short answer

Lossless compression makes a file smaller and lets you recover every pixel exactly. Lossy compression makes it much smaller by discarding detail the eye is unlikely to notice, and that detail is gone for good. Use lossless for graphics and originals, lossy for photos that will be published.

How lossless compression works

Lossless methods find patterns and describe them in fewer bytes, a bit like writing "20 blue pixels" instead of listing blue 20 times. PNG does this, as do lossless WebP and lossless AVIF. When you open the file, you get exactly the original pixels back.

The savings depend on the image. A flat illustration with large uniform areas compresses very well. A photograph, full of tiny variations, compresses poorly in lossless mode, which is why PNG photos are so large.

How lossy compression works

Lossy formats exploit how human vision works. JPG, for instance, splits the image into small blocks, then reduces fine detail and color precision, keeping what we perceive most strongly (brightness and edges) and simplifying what we perceive less (subtle color changes and fine texture). WebP and AVIF use more advanced methods built on video-compression techniques, which is why they reach smaller files at similar visual quality.

The quality slider controls how much is discarded. At high values, the difference is invisible; at low values, you see blocks, smeared edges and banding in gradients.

Visible artifacts to watch for

  • Blocking: small squares visible in flat areas, typical of low-quality JPG.
  • Ringing: halos around sharp edges and text.
  • Banding: visible steps in skies and gradients instead of a smooth fade.
  • Color bleeding: color spreading beyond the edge of an object.

If you see any of these at actual size, raise the quality or choose a different format.

Which formats use which

FormatLossyLosslessBest for
JPGYesNo (in practice)Photos
PNGNoYesGraphics, screenshots, transparency
WebPYesYesBoth, on the web
AVIFYesYesSmallest files, on the web
GIFNo (limited to 256 colors)YesSimple animation

For a detailed comparison, see JPG vs PNG vs WebP vs AVIF.

Generation loss: why you should keep originals

Each time you save a lossy file again, the encoder discards more detail. Re-saving a JPG five or ten times visibly degrades it, even at high quality. The rule is simple: keep your original (or a lossless copy), and always export the published version from that original, not from a previous export.

How to choose

  1. Is it a photo? Use lossy, at 75 to 85% quality, in WebP or JPG.
  2. Is it a logo, a screenshot or an image with text? Use lossless (PNG or lossless WebP), or reduce the number of colors with Compress PNG.
  3. Will it be edited again? Keep a lossless master and export lossy copies from it.
  4. Is it for print? Prefer high-quality JPG (90% or more) or lossless TIFF/PNG, as agreed with the printer.

Lossless is not always smaller

Lossless is a good choice only when the content suits it. Converting a photographic JPG to PNG makes the file bigger without restoring anything, because the loss already happened. Likewise, converting a lossy file to another lossy format compounds the loss. When in doubt, compress once, from the best source you have, with Compress image, and compare the before and after at actual size. For practical thresholds, read how to compress images without losing quality.

Tools for this

More guides