Compress an image without losing quality: methods, formats and settings 2026
Almost everyone configures image compression wrong. Not because it's complicated, but because nobody actually explains what's happening inside the file. This guide fixes that.
8 min read
En résumé
Lossless image compression reduces file size by removing redundant data: pixels intact, quality identical. Lossy compression goes further by sacrificing imperceptible details. For the web, lossy compression at 75-85% quality reduces weight by 60 to 80% with no visible difference on screen.
Defining lossless compression
Lossless image compression
Technique that reduces a file's weight by removing only redundant or unnecessary data, without modifying visible pixels. The perceived quality remains identical before and after compression.
Aussi appelé : lossless compression, non-destructive compression
Ex : A solid background of 1000 identical pixels stores '1000× blue' instead of repeating the value 1000 times. PNG uses this principle.
The confusion comes from the word “loss”. In image compression, it refers to loss of numerical data, not necessarily perceptible quality loss.
Two distinct mechanisms coexist:
Lossless compression removes mathematical redundancies in the file. PNG is the canonical example. Result: lighter file, pixel-perfect reconstruction guaranteed. Real limit: weight gain remains modest on complex photos (10 to 30% typically).
Lossy compression exploits human perception limits. The algorithm identifies details the eye can’t distinguish (subtle color transitions, high frequencies in uniform zones) and simplifies or removes them. JPEG has worked this way since 1992.
The dividing line isn’t “quality vs no quality”. It’s “mathematical fidelity vs perceptual fidelity”.
Lossless vs lossy compression
❌ Idée reçue
Compressing an image necessarily degrades it. The more you compress, the more visible it becomes.
✅ Réalité
Well-calibrated lossy compression (75-85% quality) is indistinguishable from the original on screen. Visible degradation only appears below 50-60% quality, or on images that have already been recompressed multiple times.
Source : Sensors/MDPI 2023 — 'Subjective Assessment of Objective Image Quality Metrics Range Guaranteeing Visually Lossless Compression' (doi: 10.3390/s23031297)
In practice, here’s what changes based on your use case:
For an e-commerce product photo: JPEG compression at quality 80 reduces the file by about 70%. The difference is invisible on screen against a white background. It only becomes noticeable if you zoom to 200% on the product edges.
For a logo or icon with sharp text: lossy compression introduces artifacts on hard edges. Lossless PNG is preferable here, even if the file is heavier.
For an infographic with solid color blocks: WebP in lossless mode compresses better than PNG while remaining pixel-perfect.
The choice isn’t “lossless = better”. It’s “what trade-off based on what the image contains and how it will be displayed”.
Which compression ratio to choose
Most tools offer a “quality” slider from 0 to 100. This number doesn’t directly represent a percentage of fidelity: it’s an internal parameter for each codec. A JPEG at quality 80 isn’t “80% of the original”.
What’s reliable in practice:
- Quality 85-95: indistinguishable from the original for almost any content. Recommended for portfolio visuals, press, digital printing.
- Quality 75-85: recommended for the web. Reduces 60 to 80% of original weight without visible artifacts on screen at normal size.
- Quality 60-75: acceptable for thumbnails, background images, secondary illustrations.
- Below 60: visible artifacts. Reserved for extreme bandwidth-constrained cases.
Recommended setting for the web
Start with quality 80 for photos, 85 for visuals with text or sharp edges. Lower only if the resulting weight is still too high for your use case. Client-side compression (like Impmage) applies these settings directly on your machine, without sending the image to a server.
Image format comparison
Image format comparison by web usage
| Format | Compression type | Average gain vs PNG | Ideal for | Browser support |
|---|---|---|---|---|
| JPEG | Lossy | 60-80 % | Photos, gradients | 100 % |
| PNG | Lossless | reference | Logos, text, transparency | 100 % |
| WebP | Lossy or lossless | 25-34 % vs JPEG | All web content | 97 % |
| AVIF | Lossy or lossless | 40-50 % vs JPEG | High-quality photos | ~94 % |
Average gains on representative web image corpus. WebP vs JPEG: Google WebP Compression Study (developers.google.com). Browser support: caniuse.com, May 2026.
WebP deserves special mention. It uses a more sophisticated predictive compression than JPEG: it analyzes neighboring blocks to encode differences rather than absolute values. Result: files 25 to 35% lighter than equivalent JPEG at comparable perceptual quality.
Important nuance: this gain varies significantly with content. On an image with uniform dominance (sky, white background), WebP’s advantage is clear. On highly detailed images (crowds, dense texture), the gap shrinks.
AVIF offers even better compression in theory, but its browser support remains inferior to WebP, and encoding times are significantly longer. For the majority of web projects in 2026, WebP remains the most balanced choice.
How to compress in practice
Compress an image for the web: recommended method
- 1
Identify the image's final use
Product photo, illustration, page background, thumbnail? The content type determines the optimal format and ratio. A complex photo tolerates more compression than a logo with text.
If the image contains sharp text or hard edges, prefer WebP lossless or PNG over JPEG.
- 2
Choose the target format
WebP for the majority of web cases. PNG for logos, icons, text-bearing screenshots. JPEG only if maximum compatibility is required (legacy emails, legacy systems).
- 3
Set compression quality
Start at quality 80. Visually compare the result to the original at actual display size, not at 200% zoom. If the difference is invisible, the setting is good.
Don't go below 70 for foreground images. Background images can go down to 60.
- 4
Remove EXIF metadata
EXIF metadata (GPS data, camera model, capture date) unnecessarily bloats the file and exposes personal information. Removing it before publication is a systematic best practice.
Impmage removes metadata by default during compression, everything happens in your browser, no data goes to a server.
- 5
Verify final weight
For the web: aim for less than 200 KB for a full-width image (1200-1600 px). Less than 80 KB for a thumbnail or column image. In 2026, images are the LCP element on the vast majority of web pages, every kilobyte saved has a direct impact on perceived load speed. If weight remains high, reduce resolution first before increasing compression ratio.
Frequently asked questions about image compression
Does compressing an image degrade quality? ▾
What's the difference between reducing size and compressing an image? ▾
How do I compress a JPEG photo without visible loss? ▾
Why does my image lose quality after compression? ▾
What size image for a website in 2026? ▾
Are my images sent to a server during compression? ▾
How do I compress an image online for free? ▾
How do I compress a PNG image without visible artifacts? ▾
Compress my images: 100% local, free
JPEG, PNG, WebP and AVIF compression directly in your browser. No image leaves your device.
Try Impmage
GlitchGhost
Independent developer, creator of Impmage
Developer specializing in web performance and image optimization. Creator of Impmage, a 100% local compression tool that processes your images directly in the browser.