Skip to content
pixvertoPixverto

Lossy vs Lossless Image Compression Explained

·

Every image format compresses data, but not in the same way. Knowing the difference between lossy and lossless compression saves you from blurry pictures, giant files and quality that quietly disappears each time you save. This guide explains both and shows how to work with them.

Lossless compression: smaller, but nothing is lost

Lossless compression finds patterns and stores them more efficiently, much like a ZIP file. When you open the image, every pixel is exactly as it was. PNG, GIF, optionally BMP and lossless WebP work this way.

The saving is modest for photographs, because photos are full of noise that has few patterns. For flat graphics, screenshots and logos, though, it can be excellent.

Lossy compression: much smaller, with a quality trade

Lossy compression permanently removes information the eye is least likely to miss, such as tiny color differences and very fine detail. JPG, lossy WebP, AVIF and HEIC use it. The file can shrink by 90 percent or more, and at moderate settings the change is almost impossible to see.

Push it too far and artefacts appear: blocky squares, smeared edges, banding in skies and a muddy look in dark areas.

Lossy vs lossless side by side

LosslessLossy
QualityIdentical to the sourceSlightly reduced, adjustable
File sizeLargerMuch smaller
Typical formatsPNG, GIF, lossless WebPJPG, WebP, AVIF, HEIC
Best forGraphics, screenshots, masters to editPhotos for sharing and the web
Repeated savingNo added lossLoses a little more each time

Pros and cons of lossless

  • Pros: perfect fidelity, ideal for editing and archiving, no generation loss.
  • Cons: big files for photos, and slower pages and uploads.

Pros and cons of lossy

  • Pros: very small files, fast pages and easy sharing.
  • Cons: detail is gone for good, and over-compression is visible.

Generation loss: why saving again and again hurts

Each time a lossy file is opened, edited and saved again, it is compressed again and loses a little more. After many rounds the damage becomes visible. This is called generation loss, and it is the reason a picture passed around between apps can end up looking worse than the original.

Messaging apps and social networks often compress pictures again when you upload, so sharing a JPG that is already heavily compressed multiplies the damage.

Step by step: a workflow that protects quality

  1. 1Keep an untouched original or master, in the highest quality you have.
  2. 2Edit from the master. If you need many rounds of editing, work in a lossless format such as PNG or TIFF.
  3. 3Resize first, then compress once. Resize and Compress does both in one step so the picture is saved lossy only once.
  4. 4Export a lossy copy at the end, choosing the quality that suits the destination, for example 80 to 85 for photos you care about and 70 to 75 for general web use.
  5. 5Compare at 100 percent zoom, not as a thumbnail, and keep the original in case you need another size later.

Choosing a quality setting

For JPG and WebP, a quality of 80 to 85 is a safe default for pictures you care about, and 70 to 75 is plenty for most web use. Below about 60 the loss becomes easy to notice on close inspection. Compress Image lets you pick a quality or a target size and shows the saving, and the guide to reducing image size walks through the process.

Common mistakes

  • Converting a lossy file to a lossless one to restore quality. JPG to PNG never brings back lost detail. See does converting JPG to PNG improve quality.
  • Compressing an already compressed picture again instead of going back to the original.
  • Saving screenshots and logos as low-quality JPG, which blurs text and edges.
  • Raising the quality setting on an already compressed file, which makes it bigger without improving it.

Frequently asked questions

Is PNG lossy or lossless?

PNG is lossless. It keeps every pixel exactly, which is why photographs saved as PNG are large.

Is JPG always lossy?

Yes, standard JPG discards some data when saved, at every quality level, although at high quality the loss is very small.

Can I get back quality lost by lossy compression?

No. The detail is removed permanently, which is why you should keep an original and compress copies.

What quality setting should I use for JPG?

Around 80 to 85 for pictures you care about, and 70 to 75 for general web use. Below about 60 the loss starts to show.

Is lossy compression bad?

Not at all. It is what makes photos small enough to share and load quickly. It only becomes a problem if you compress too hard or repeatedly.

Try the tools