When you send a photo on WeChat or upload an image to a website, one thing happens behind the scenes: the file gets smaller.
But "getting smaller" actually happens in two completely different ways. One is called "throwing things away," the other "repacking." In industry terms they're lossy compression and lossless compression — the two fundamental routes of image compression. Today we'll break both down clearly, in plain language with no jargon.
One-line definition: lossy compression discards details the eye can barely notice, shrinking files by 80-90%, but the process is irreversible and the original can't be recovered; lossless compression drops not a single bit and decompresses byte-for-byte identical to the original, but usually only shrinks files by 20%–50%.
What Image Compression Actually Does
Take an image apart and it's just a pile of color dots. A phone photo easily has tens of millions of dots, each storing a color value. The file is large because it faithfully stores every one of those tens of millions of colors.
Compression wants to do one thing: express the image with fewer bytes. How do you make it smaller yet still look the same? Two routes.
Lossy: Throw Away What You Can't See
Lossy sounds scary — "discarding data." But good lossy compression doesn't delete pixels at random; it uses a "human vision model" to calculate which information you likely won't notice missing, throws that away, and packs the rest tightly.
Think of it like writing a synopsis of a novel: a good synopsis keeps the plot and drops only the adjectives nobody remembers.
The effect is powerful. A 5 MB photo compressed to 500 KB is routine — 80-90% smaller, and it looks the same on screen.
The only cost: you can't go back. The discarded bytes are truly gone, and the moment you save you accept this version — a one-way street.
Lossless: Not a Bit Changes, Just Recoded
Lossless is the more polite one. The file gets smaller but loses not a single bit, decompressing back byte-for-byte identical to the original.
It does exactly what ZIP does: find repetition and patterns in the data, and record them in a more space-efficient way.
For example, if a row of pixels has 200 identical blue pixels in a row, lossless encoding won't store "blue" 200 times — it just records "blue ×200" and moves on. That's why it compresses screenshots and UI — images full of repeated solid colors — beautifully.
The cost is equally blunt: full fidelity, but limited savings. On images, lossless typically only shrinks files by 20%–50%, sometimes less. A noisy, chaotic photo has almost no patterns to exploit, so lossless barely helps.
The lossless tiers of PNG and WebP, and FLAC in audio, all take this route. Nothing is lost and it's smaller — as long as you can tolerate it still being fairly large.
How Does JPEG Dare Delete Your Colors? The Loophole in Human Vision
Answer first: JPEG is a lossy compression format. You're probably wondering: how does it dare touch my color data?
Because it exploits a loophole in human vision. The eye has two kinds of photoreceptor cells: rods handle brightness, cones handle color. There are about twenty times more rods than cones, and the brain's resolution for brightness is far higher than for color. In plain terms: you're extremely sensitive to light and dark, but fairly insensitive to color.
JPEG knows this. When compressing it splits the image into brightness and color channels, aggressively trims color and preserves brightness. This is called chroma subsampling — see the Wikipedia explanation — which is how it can throw away over half the color while your eye notices no difference.
Then it stacks on the discrete cosine transform (DCT), splitting the image into frequencies and cutting high-frequency fine textures and noise even harder — things your eyes aren't good at seeing either, especially in colorful areas. The whole strategy is to discard "what you won't miss," and there's plenty of it.
That 85% Sweet Spot
For the vast majority of photos, saving JPEG at quality 80-85 is indistinguishable from the original. Not "close enough" — put them side by side at normal distance on a normal screen and most people can't tell which is which.
I'm not exaggerating. I've gone through several blind tests myself, and the conclusions are consistent: at 85, people simply can't see the difference that was removed. To actually spot it you'd have to zoom to 400% and squint at a 20-pixel region, and even then you might only guess right.
But the size difference between quality 100 and 85 is huge, often 60%–75% smaller. This isn't rounding — it's the difference between an instant page load and a frustrating bounce, and it's the hardest win in image optimization.
Drop below 70 and you'll start to see it: blocky edges, muddy skin tones, blurry text. But that generous 80-90 range is the best value — big savings at zero visible cost.
When to Go Lossy Without Worry
The vast majority of images on the web should be lossy. Web photos, social uploads, and thumbnails all face the same reality: no one counts the pixels on your header image while scrolling. JPEG/WebP at quality 80-85 looks good and loads fast.
Instagram and Facebook recompress whatever you upload anyway, so uploading an original TIFF gains you nothing. Thumbnails are small and come dozens per page, so heavy compression is only sensible. Send a photo to your aunt — she'll view it on her phone and doesn't need a 24-megapixel original.
In these scenarios the size saved is real while the quality lost is mostly theoretical. 90% smaller with zero perceived loss — not a compromise, just common sense.
When You Must Go Lossless
Lossy is the default, but in these cases losing even a little is wrong:
- Medical imaging. A doctor reading a scan for tumors shouldn't have you deciding "which detail is probably unnoticeable." Lossy compression of diagnostic images is tightly regulated by bodies like the FDA and ACR.
- Archival masters. Master copies of photos, artwork and archives must be lossless. You can't see the difference today, but you don't know what tools will demand tomorrow. Lossy is a one-way street.
- Repeatedly edited work. Every time you open a JPEG, edit, and save, it recompresses and adds another layer of artifacts. This is called generational loss, which is why pros shoot RAW and edit in TIFF/PSD. Compress the deliverable, never the working file.
- Images with text and hard edges. Screenshots, logos and UI mockups are hard lines and solid color blocks — lossy can't handle them. JPEG was born for photos; PNG is far stronger for these. Don't compress a spreadsheet with a photo format.
At a Glance: Lossy vs. Lossless
| Dimension | Lossy | Lossless |
|---|---|---|
| Reversible | No (one-way) | Yes (byte-for-byte) |
| Compression ratio | High, often 60%–90% smaller | Limited, ~20%–50% |
| Quality | Basically invisible loss (quality 80-85) | 100% fidelity |
| Common formats | JPEG, lossy WebP, AVIF, MP3 | PNG, lossless WebP, TIFF, FLAC, ZIP |
| Best for | Web photos, social, thumbnails | Medical, masters, re-editing, screenshots/logos |
FAQ
What is the difference between lossy and lossless compression?
Lossy compression discards details the human eye can barely notice to dramatically reduce size, and the process is irreversible; lossless compression loses no data and decompresses byte-for-byte identical to the original, but its compression ratio is limited, usually only 20%–50% smaller.
Is JPEG lossy or lossless?
JPEG is a lossy compression format. It discards colors and high-frequency details the human eye is insensitive to via chroma subsampling and the discrete cosine transform (DCT), shrinking photos dramatically. JPEG also has a lossless mode, but the web and the vast majority of scenarios use the lossy tier.
Should I set image compression quality to 80 or 100?
For the vast majority of photos, saving at quality 80-85 looks indistinguishable from the original at normal viewing distance and on screen, yet the file is 60%–75% smaller than at quality 100. Visible artifacts like blockiness and muddy skin tones only appear below 70, which is why 80-85 is the best-value sweet spot.
When must you use lossless compression?
Medical imaging, archival masters, editing files that are repeatedly opened and modified, and screenshots/Logos/UI with text and hard edges all require lossless. Lossy is a one-way street — discarded data cannot be recovered, and repeated saving causes generational loss.
One Last Word
Lossy is the web default: 80-85 saves a lot on photos with near-zero visible loss. Lossless goes to archival masters, medical imaging, and editing workflows that are re-saved repeatedly. The safest play is one sentence: keep a lossless master, and export lossy for delivery.
Ready to put this into practice? Use our free image compressor to shrink photos lossy or lossless, or jump to resize, crop, and convert JPG to WebP to apply what you just learned.