Jump to
A 12 MB photo doesn't need to be 12 MB. Modern compression algorithms can shrink most images by 60-80% without any visible difference at normal viewing distances. Here's how it works and how to use it.
Lossy vs lossless compression
Lossless compression reduces file size without discarding any data. The decompressed image is pixel-identical to the original. PNG uses lossless compression.
Lossy compression discards data that humans are unlikely to notice. JPEG uses lossy compression. The quality setting (1-100) controls how much data is discarded.
The quality sweet spot
For JPEG:
- Quality 95-100: Visually identical to original. File size: 40-60% of original.
- Quality 80-90: Indistinguishable at normal viewing. File size: 20-40% of original.
- Quality 60-70: Slight artifacts visible on close inspection. File size: 10-20% of original.
- Below 60: Visible quality loss. Only use for thumbnails.
For most web and email use, quality 80-85 is the sweet spot.
PNG optimization
PNG compression is lossless, but you can still optimize:
- Remove metadata. EXIF data, color profiles, and comments add bytes.
- Reduce color depth. If the image doesn't need 16 million colors, use a palette.
- Strip alpha channel. If you don't need transparency, remove it.
WebP and AVIF
Modern formats compress better than JPEG:
- WebP: 25-35% smaller than JPEG at equivalent quality
- AVIF: 50% smaller than JPEG at equivalent quality
Browser support:
- WebP: 97% of browsers (2026)
- AVIF: 90% of browsers (2026)
When to compress
- Email attachments. Most mail servers cap at 10-25 MB.
- Web pages. Page speed directly impacts SEO and user experience.
- CMS uploads. WordPress, Squarespace, and others have upload limits.
- Storage. Cloud storage costs add up with large files.
When not to compress
- Archival masters. Keep originals uncompressed for future editing.
- Print production. Print shops need maximum quality.
- Before editing. Compress after all edits are done, not before.
Quality-slider sweet spots by format
The "quality" number means something different in each encoder, so the same value is not comparable across formats. Use these ranges as starting points, then verify by eye:
| Format | Web-safe quality | Typical size vs original | Notes |
|---|---|---|---|
| JPEG | 80-85 | 20-40% | Below 70 shows blocking in skies and gradients |
| WebP (lossy) | 75-82 | 15-30% | WebP holds detail lower than JPEG; 78 β JPEG 85 |
| AVIF | 50-63 | 10-25% | AVIF's scale is different β 55 is already high quality |
| PNG (lossless) | n/a | 40-70% | Quality is fixed; savings come from palette reduction |
A practical rule: encode two or three versions around the recommended value, compare them at 100% zoom, and keep the smallest one that still looks clean.
A visual quality checklist before you ship
Compression artifacts hide in predictable places. Before publishing, inspect the compressed file at 100% zoom and check:
- Smooth gradients β skies, shadows, and soft backgrounds are the first to show banding or blocky patches.
- Skin tones β faces reveal color shifts and mottling that landscapes hide.
- Text and sharp edges β logos and captions get a halo (ringing) when over-compressed.
- Fine texture β hair, fabric, and foliage lose detail and turn mushy.
- Dark areas β deep shadows show blocking artifacts more than bright areas.
If any of these look wrong, raise the quality by 5-10 points and re-export rather than accepting the smaller file.
Compress in the right order
Order matters β resizing after compressing wastes quality:
- Resize first to the largest size you will actually display. A 4000px photo shown at 1200px is carrying 3x too much data. Use Photo Resizer to set exact dimensions.
- Strip metadata you don't need (EXIF, GPS, thumbnails).
- Compress last with Image Compressor, targeting the quality range above.
- Verify against the checklist, then ship.
For a survey of dedicated tools and how they differ, see the best free image compressors. If you are unsure whether you need to shrink dimensions or just file size, image compressor vs resizer explains which tool solves which problem.
Frequently Asked Questions
Does compressing an image reduce its dimensions?
No. Compression reduces file size (bytes) while keeping the same pixel dimensions. To change width and height you need to resize, which is a separate step.
Can I recover quality after compressing?
No. Lossy compression permanently discards data. Always keep an uncompressed master and compress a copy, so you can re-export at higher quality later if needed.
Is repeatedly saving a JPEG bad?
Yes. Each lossy save re-compresses and adds new artifacts (generation loss). Edit from the original and export once, rather than opening and re-saving the same JPEG.
What quality should I use for photos on a website?
Start at JPEG 80-85 or WebP 75-82. That is visually identical to the original for most photos while cutting file size by 60-80%.
Related tools
- Image Compressor β quality-targeted compression in your browser
- Photo Resizer β resize before compressing for maximum savings
Keep reading

image conversion Β·
Image Conversion vs Compression: Solve the Right Problem
Separate file-format conversion, byte-size compression, and pixel resizing so you can meet an upload requirement without unnecessary quality loss.
Read
wordpress Β·
How to compress images for WordPress and CMS uploads
Shrink images before uploading to WordPress, Squarespace, Wix, and other CMS platforms.
Read
png Β·
How to compress PNG files without losing transparency
PNG compression techniques that reduce file size while preserving the alpha channel for transparent images.
ReadConversation
Join the conversation
Share a useful question, correction, or practical tip. Comments are reviewed before they appear.
Loadingβ¦