How image compression works
Compression rewrites the image with a more aggressive encoder setting, so fewer bytes are needed to describe the same picture. The image is decoded in the browser, redrawn on a canvas and written again with a different compression setting. Nothing is edited in place, so your original file stays untouched on your device.
Quality versus file size
Lossy compression removes information the eye is least likely to notice: fine colour variation first, then subtle texture. The higher the compression, the more of that information disappears. A quality level around 75–85 is the usual sweet spot for photographs, often cutting the file size by more than half with very little visible change. Graphics with sharp edges, flat colour and text need a higher setting, because compression blurs exactly those areas.
Practical tips
- Compress once, from the highest quality original you have. Repeatedly compressing an already compressed file degrades it each time.
- WebP usually reaches a smaller file than JPG at the same visual quality, and is supported by every current browser.
- If an image is far larger than the space it fills on screen, resizing it first saves more bytes than any compression setting.
- Check the result at 100% zoom before publishing. The before/after sizes are shown for every file so you can see exactly what was saved.
Why smaller images matter
Images are usually the heaviest part of a web page. Reducing them shortens loading time on slow connections, lowers data usage for mobile visitors and improves the Core Web Vitals scores that search engines measure, in particular Largest Contentful Paint.