Image Compression: How to Shrink Files Without Ruining Quality
Compression works best when you decide where the image will be used first. Shrinking the dimensions and then tuning quality usually beats dragging the quality slider to the bottom.
When compression is actually needed
The usual trigger is a hard upload limit. Application forms, email attachments, chat apps, and marketplace backends often cap file size, and a photo straight from a phone can exceed it. The second trigger is speed: a few unoptimised images can noticeably slow a page's first load, particularly on a mobile connection.
Storage and transfer costs are easier to overlook. Hundreds of product shots or screenshots kept in cloud storage add up, and a compressed copy is often enough for day-to-day use. The important condition is that the original stays somewhere safe; compression should produce a delivery copy, not replace your only master.
How to adjust size and quality in the right order
Resize first, then compress. Scaling the longest edge down to the number of pixels actually needed is usually more effective than aggressive quality reduction, and it avoids the muddy look that comes from over-compressing a large image. Once the dimensions are right, try quality from the high end downward and compare the preview as you go.
Choose the output format by destination. JPG is the safest for photos and for anything you send to an unknown recipient; WebP is often smaller and supports transparency, but older software and some submission systems still reject it. Screenshots with small text, line art, and logos are the most sensitive, so keep quality higher and inspect them at 100%.
- Resize before lowering quality
- Use JPG for compatibility, WebP for smaller web assets
- Judge text and edges at 100%, not in the thumbnail
Alternatives, and when not to compress
Do not compress the file you plan to archive, edit again, or use for a photography record. Canvas re-encoding strips metadata, and lossy compression cannot be undone. Keep the master separate and compress only the copy you publish. If you need transparency and the recipient insists on JPG, change the plan: JPG has no alpha channel and will fill transparent areas with a solid colour.
For web performance, compression is only one lever. Serving responsive images, letting a CDN choose WebP automatically, and caching usually matter more than hand-compressing a single file. At the other end, a small image that has already been compressed has little left to give; re-encoding it can even make it larger, so leave it alone.
FAQ
Why did my image get bigger after compression?
This often happens with an already compressed JPG or a very small PNG. Re-encoding introduces new loss, and a very high quality setting can produce a larger file than the original. Resize first, then work down from a moderate quality setting and compare the actual file size.
How much quality can I drop before an image looks bad?
It depends on content and use. Photos usually tolerate a mid-to-high setting, while text, line art, and smooth gradients need more care. Do not judge from a thumbnail; view at 100% and check edges and sky transitions before applying the setting to a whole batch.
Does compression remove EXIF and location data?
Canvas-based compression usually drops EXIF, capture time, GPS coordinates, and the colour profile. That is useful when posting images publicly, but it is a reason to keep the original for archiving. Never treat a compressed copy as your only record of a photo.
Related tool:Compress Image