"Without losing quality" can mean two different things, and mixing them up causes most compression mistakes:
- Mathematically lossless: the decoded pixels are exactly the same as the original. PNG and lossless WebP do this.
- Visually acceptable lossy: some pixel data is thrown away, but the difference is hard to see at normal viewing size. JPEG and lossy WebP do this, and they make much smaller files.
This guide shows the difference with a test you can reproduce, then shows how to check the result from ImageWand's compressor.
Lossless vs lossy in one table
| Lossless (PNG, lossless WebP) | Lossy (JPEG, lossy WebP) | |
|---|---|---|
| Pixels after decoding | Identical to the original | Approximately the same |
| Typical saving on photos | Small | Large |
| Typical saving on flat graphics | Large | Often worse than lossless |
| Safe to re-save repeatedly | Yes | Each save is a new approximation |
| Good for | Screenshots, logos, diagrams, master copies | Photos for web pages and sharing |
MDN's guidance follows the same split: "Photographs and other continuous-tone images can usually tolerate lossy compression," while for "screenshots, diagrams, logos, and line art, prefer lossless encoding" (MDN image format guide).
A reproducible compression benchmark
These results were produced on 23 November 2026 with sharp 0.34.5 (libvips 8.17.3, libwebp 1.6.0, JPEG with sharp defaults: mozjpeg option off, 4:2:0 chroma subsampling). The test images are synthetic and generated by code; the photo-like generator and the downloadable graphic are in the format guide. The numbers are not from ImageWand's in-browser compressor, and a real photo will give different sizes.
PSNR measures how close the decoded file is to the original pixels (higher is closer). It is a simple metric and does not always match what people notice, so the zoomed crops below matter as much as the numbers.
Photo-like image, 1600 x 1000
| Encoding (sharp) | Type | Bytes | PSNR |
|---|---|---|---|
| PNG, compressionLevel 9 | Lossless | 1,950,426 | identical |
| WebP, lossless | Lossless | 1,191,190 | identical |
| PNG, 256-colour palette | Lossy (colour reduction) | 679,851 | 48.3 dB |
| JPEG, quality 95 | Lossy | 339,231 | 43.0 dB |
| JPEG, quality 85 | Lossy | 128,048 | 41.2 dB |
| WebP, quality 80 | Lossy | 38,940 | 40.6 dB |
| JPEG, quality 60 | Lossy | 52,009 | 39.3 dB |
| JPEG, quality 30 | Lossy | 30,533 | 37.4 dB |
Graphic with transparency, 1200 x 750
| Encoding (sharp) | Type | Bytes | PSNR |
|---|---|---|---|
| PNG, compressionLevel 9 | Lossless | 15,909 | identical |
| WebP, lossless | Lossless | 4,732 | identical |
| PNG, palette | Lossy (colour reduction) | 8,277 | 74.4 dB |
| JPEG, quality 85, flattened onto white | Lossy | 31,477 | 37.7 dB |

What this shows:
- Lossless saved little on the photo-like image (WebP lossless was 61% of the PNG). Any large reduction on a photo comes from lossy compression.
- JPEG quality has diminishing returns. Going from quality 95 to 85 cut the file by about 62%; going from 60 to 30 saved much less in bytes but added visible artefacts.
- For flat graphics, lossless wins. Lossless WebP was smaller than JPEG and kept every pixel and the transparency.
- Re-saving at the same settings was stable in this test. Re-encoding the quality 85 JPEG nine more times with the same encoder and settings changed PSNR only from 41.2 to 41.1 dB. Losses add up faster when you edit, crop or resize between saves, or switch encoders, so keep an original and export from it.
For a larger test with four kinds of image (photo-like, logo, transparent and text), PSNR and SSIM scores, magnified crops and a script that regenerates every number, see our JPEG, WebP, AVIF and PNG compression benchmark.
Using ImageWand's compressor
The compressor runs in your browser: it processes your image on your device, and the image is not uploaded to ImageWand. It uses the browser's built-in encoders, so the exact bytes differ between browsers and from the sharp numbers above, but the pattern is the same: higher quality keeps more detail, lower quality removes more.
After compressing, check the file size and format the tool reports, and compare the result with the original at 100% zoom. To compress many images, the free batch tool can compress up to 100 images in your browser and download them as one ZIP.
Transparency and JPEG
JPEG has no transparency, so any transparent areas must be filled with a solid colour when an image is saved as JPEG. The HTML standard requires canvas exports to formats without alpha to be composited onto opaque black unless a background is drawn first.

If your image has transparency and you need to keep it, use PNG or WebP: PNG to WebP keeps transparency and usually makes a smaller file. If you need a JPEG, choose JPG output on a white background, then check the edges.
A practical workflow
This is an ImageWand suggestion, not a fixed rule:
- Keep the original. Always compress a copy, so you can go back if the result is too soft.
- Resize first. Pixel dimensions affect size more than any quality setting. If a photo will be shown at 800 pixels wide, resize it with the resize tool before compressing. See resizing without losing quality.
- Pick the format. Photos: JPEG or lossy WebP. Screenshots, logos and transparent graphics: PNG or lossless WebP.
- Start with a high quality setting, check the result at 100% zoom, then lower it step by step. Keep the lowest settings for small previews where detail does not matter.
- Look at the right places. Smooth gradients (banding), fine texture (smearing) and hard edges such as text (halos and blocks) show artefacts first.
- Check the size limit separately. If a site requires a maximum file size, compare the size shown after compressing against it. If it is still too big, reduce pixel dimensions rather than lowering quality further.
Why compression matters for websites
Google's image guidance notes that "images are often the largest contributor to overall page size, which can make pages slow and expensive to load" (Google Search Central). web.dev's advice for Largest Contentful Paint includes reducing image size with optimal sizing, modern formats and compression (web.dev, Optimize LCP). Smaller files help most when the image is the largest element in view; they are not a guarantee of a better ranking on their own.
For responsive markup and measured examples, see the image SEO guide.
Common questions
How do I know if I've compressed too much?
Compare the result with the original at 100% zoom. Look for banding in skies and gradients, blotchy texture, and blocks or halos around edges and text. If you can see them at the size the image will be displayed, use a higher quality.
Should I compress before or after editing?
After. Compression should be the last step, applied to a copy of your edited, full-quality file.
Is a PNG always "better quality" than a JPEG?
A PNG made from a JPEG keeps the JPEG's existing artefacts; converting does not restore lost detail. PNG is only better if it was made from the original, uncompressed source.
What about printing?
Print shops usually want high-resolution files with little or no lossy compression. Ask the printer for their requirements, and send an export from your original rather than a web-compressed copy.
Related reading
- JPG vs PNG vs WebP vs AVIF: choosing a format, with the test image generator.
- WebP format guide: lossy vs lossless WebP, animation and what to expect from the converter.
- Resize images without losing quality: resize first, then compress.
- Optimize images for SEO: responsive images and Core Web Vitals.
- Resize vs compress vs crop: which step a task needs, with measured outputs.


