When you compress an image and the file gets smaller, that data has to go somewhere — and it doesn't go to some other file. It's gone. The question is whether you notice, and more importantly, whether you can get it back. The short answer is no. But understanding exactly what gets thrown away, and why, changes how you think about every image you edit, export, or send.
The word "compression" covers two very different processes that work in opposite ways:
Lossless compression finds redundant patterns in a file and encodes them more efficiently. No information is discarded. You can decompress the file and get back the exact original, bit for bit. PNG uses lossless compression. ZIP files use lossless compression. The downside is that the file size reduction is limited — you can only squeeze out so much by rearranging patterns.
Lossy compression actually throws away information. It exploits the limits of human perception — discarding visual details the eye supposedly won't notice — to get much smaller files. JPEG uses lossy compression. So do MP3 for audio and MP4 for video. The reduction in file size can be dramatic, but it's permanent. Once information is discarded, it cannot be reconstructed.
JPEG is the format most people mean when they talk about "compressing" a photo. What it does is genuinely clever — and genuinely destructive.
The final step is lossless encoding of the surviving data. The lossy damage was done in step 4 — the rest is just packing what's left efficiently. When you open the JPEG, the decoder reads it back, but those zeroed-out frequency values are gone. The decoder reconstructs the image from what remains, filling in the missing detail with approximations.
Most image editors give you a quality slider from 0 to 100 when saving a JPEG. What you're really controlling is how aggressively the quantization table rounds values in step 4.
At quality 100, the quantization divisors are all 1 — meaning no rounding occurs, and the DCT values are preserved exactly. The file is still technically lossy (the color space conversion in step 1 discards some information), but the visible quality is essentially perfect.
At quality 60, fine detail and high-frequency patterns are heavily rounded or zeroed out. The file is much smaller, but smooth gradients may show banding, edges may soften, and textured areas may look smudgy.
At quality 20 or below, blocking artifacts become visible, colors posterize, and the image starts to look like it was viewed through frosted glass.
PNG uses a completely different approach. Rather than discarding information, it looks for patterns it can describe more efficiently. A row of 500 identical blue pixels doesn't need to be stored as 500 separate values — it can be stored as "blue, ×500." PNG uses a filter step to make rows of pixels more predictable (turning absolute values into differences from neighboring pixels, which are smaller numbers), then applies DEFLATE lossless compression on the result.
The result is a file that can be perfectly reconstructed every time. For images with large flat areas, solid colors, text, or line art, PNG compression is very effective. For photographs with millions of subtly different colors, PNG compresses much less than JPEG — photographs don't have the repetitive patterns that lossless compression exploits well.
| Use case | Best format | Why |
|---|---|---|
| Photographs for web | JPEG or WebP | Lossy compression achieves very small files with barely visible quality loss at moderate settings |
| Screenshots, UI, text | PNG | Lossless preserves sharp edges and exact colors; lossy would blur text and create artifacts around edges |
| Logos, icons, illustrations | PNG or SVG | Flat colors and sharp lines need lossless; SVG is even better for vector graphics |
| Photos for archiving | PNG or TIFF | Keep a lossless original; you can always export a compressed version later |
| Photos for sharing or email | JPEG (quality 80–90) | Good balance of file size and visible quality for casual viewing |
| Photos for web (modern) | WebP | Smaller than JPEG at equivalent quality; supported by all modern browsers |
This comes up often — someone compresses an image, notices quality loss, and wonders if there's a tool to fix it. There isn't, not really. The information that was discarded during quantization is simply gone. No software can reconstruct detail that was never stored.
What AI upscalers and enhancement tools do is hallucinate plausible detail based on patterns learned from other images. They can make a compressed image look sharper and cleaner, but the "detail" they add is invented, not recovered. Whether that's useful depends on the purpose — it might look fine for a social media post but be completely wrong for a document scan.
The only real fix is to start from a higher-quality original. This is why keeping your originals — the uncompressed or minimally compressed versions straight from the camera — matters so much. You can always compress down from a high-quality original. You cannot compress up from a low-quality one.
Adjust quality and see file size in real time. Convert to WebP for even smaller files. Nothing is uploaded — everything runs locally.
Open Image Compressor