How to compress an image without making it look bad
Practical guidance on image compression: which quality setting to choose, which format to use, and how to avoid the generation loss that ruins photos.
Resize before you compress
A 4,000-pixel-wide photo displayed in a 800-pixel column is carrying five times the detail anyone will see. Resizing to the size it is actually displayed at usually saves more than any quality setting.
For most web use, 1,200 to 1,600 pixels on the long edge is plenty. Thumbnails rarely need more than 600.
Choosing a quality setting
Between 70% and 80% is the sweet spot for photographs. Below 60% you start to see blocking in skies and gradients; above 90% the file grows quickly for detail nobody notices.
Screenshots and images with text or sharp edges are less forgiving. Keep them higher, or use PNG or lossless WebP.
Which format to use
WebP is typically 25 to 35% smaller than JPEG at equivalent visual quality and is supported by every current browser. JPEG remains the safest universal choice. PNG is for transparency and lossless copies, not photographs.
- Photographs for the web: WebP, JPEG as a fallback.
- Logos, icons and screenshots with text: PNG or lossless WebP.
- Anything needing transparency: PNG or WebP, never JPEG.
Avoid generation loss
Every lossy save discards detail permanently. Compressing an already-compressed file twice does visible damage, and the second pass often barely reduces the size.
Always compress from the original file. Keep the original somewhere safe and treat compressed copies as disposable output.
A note on privacy
Browser-based tools like ours process the file on your own device using a canvas element. Nothing is uploaded, which matters when the image is a document, an ID or anything you would not email to a stranger.
Tools mentioned in this guide
Frequently asked questions
How small should a web image be?
Aim for under 200 KB for in-article images and under 500 KB for a full-width hero. Smaller is better if the picture still looks right.
Does compressing remove EXIF data?
Canvas-based compression drops most metadata, including location tags, because the image is redrawn from raw pixels.
Why did my file get bigger?
Converting a highly optimised small graphic to a lossy format, or raising the quality above the original, can increase the size. Compare before downloading.
More reading
- How to calculate EMI by hand (and check the bank's number)
The EMI formula looks intimidating, but it is one multiplication and one division once you know what each letter means.
- How to calculate percentages without second-guessing yourself
Percentage questions come in three shapes. Learn which formula matches which shape and the arithmetic becomes trivial.
- How to calculate CGPA, SGPA and the percentage your university wants
CGPA is a credit-weighted average, not a plain one. That single detail is where most manual calculations go wrong.