Every image compression decision boils down to one question: are you allowed to throw away data, or not? The answer depends on your content type and your reuse plans.
The terms "lossless" and "lossy" sound technical but the distinction is simple. Lossless compression makes files smaller without changing any pixels. Lossy compression makes files smaller by throwing away some pixel detail you probably won't notice. Which is right depends on what you're doing.
A lossless-compressed image, when decompressed, is byte-for-byte identical to the original. Open the file, save it again as the same format, open it again — every pixel is exactly the same as it started.
This is achieved through clever encoding tricks that exploit patterns in the data without removing information. For example: if a row of 100 pixels are all the same color, you can encode that as "100 of this color" instead of storing 100 identical pixel values. The pixels themselves haven't changed.
Formats that are always lossless:
Lossy compression throws away some pixel detail in exchange for dramatically smaller files. The art of lossy compression is throwing away the parts humans don't notice while preserving the parts we do.
Formats that are typically lossy:
Lossy compression is non-reversible. Once you save a JPG, the data that was thrown away is gone — re-saving the file doesn't restore it. This matters when editing.
A 12-megapixel photo, fresh out of an iPhone, compared across formats:
The same photo. The lossy versions look indistinguishable from lossless to almost everyone. The file sizes differ by 70×. For web delivery, this is enormous.
Screenshots, line art, diagrams, logos, comics. JPG-style compression introduces "ringing" artifacts around sharp edges — the boundary between a black letter and a white background gets a halo of muddy pixels. Lossless preserves crisp edges.
If you can read text in the image, prefer lossless.
Every lossy save loses more quality. If you save a JPG, edit it, save again, and repeat, the artifacts compound. After ten generations the image looks visibly degraded.
Master files (the version you actually edit) should be lossless. Compress to lossy only at the final export step for delivery.
Storage is cheap; lost data is gone forever. Photographs you may want to print, edit, or re-process later should live in their original RAW or in lossless format. Compress copies, not originals.
Any context where every pixel needs to be authentic. Lossy compression can introduce artifacts that mislead diagnosis or analysis.
Photos have continuous tones and gradients that lossy compression handles extremely well. The quality difference between JPG quality 82 and lossless is imperceptible at normal viewing sizes, but the file size difference is 8-15×.
Faster page loads. Lower CDN costs. Better mobile experience. Lossy compression makes all of these dramatically better with no perceptible quality cost.
If the image is decorative (a header pattern, a divider graphic, a background texture), you can use aggressive lossy compression. Visible artifacts are okay because nobody scrutinizes background images.
WebP and AVIF both support lossless and lossy modes. This gives you one format that handles every case:
You don't need to mix PNG and JPG anymore. WebP can do both jobs with better compression than either.
PNG is lossless, but it's terrible at compressing photographic content. A photo saved as PNG is usually 5-10× larger than the same photo as a high-quality JPG. If someone hands you a photo as a PNG, convert it to JPG or WebP before publishing.
The reverse mistake. JPG smears text and creates haloes around sharp edges. Screenshots become noticeably blurry. Use PNG or WebP lossless for screenshots.
Quality 60 might be fine for a low-detail landscape photo. The same setting on a portrait with skin tones will produce visible blotching. Test by content type, not just by category.
Each lossy compression cycle adds artifacts. If your source is a quality-60 JPG that someone sent you, compressing it again to quality 80 doesn't help — you're working from already-degraded content. Either accept the existing quality or get the original.
Try both modes with pictoolkit's image compressor. Compare lossless vs lossy output for your specific content type and pick what works.