How to compress images without visible quality loss
A photo straight from a phone can be several megabytes. Shrink it well and nobody can tell, except that your page loads faster.
Two ways to make a file smaller
- Lower the quality: the encoder throws away detail the eye barely notices.
- Lower the dimensions: fewer pixels means less data. A photo 4000 pixels wide shown at 800 pixels wide is wasting most of its size.
Start with dimensions
Work out the biggest size the image will actually be displayed at. For a full-width banner that might be about 1920 pixels. For a blog photo, often 1200 pixels or less. Screens with high pixel density benefit from roughly double the displayed size, but there is rarely a reason to go beyond that.
The Toolstia image compressor has a longest-side option that scales the image down, and the image resizer gives exact sizes for common platforms.
Then choose the quality
For photos saved as JPG or WebP, a quality setting of about 75 to 85 usually looks the same as the original at normal viewing size while being much smaller. Below about 60 you start to see blocky patches and smeared detail, especially in skies and skin. Zoom to 100 percent on a few results before you decide.
Pick the right format
- JPG: the safe choice for photos. Works everywhere.
- WebP: usually smaller than JPG at similar quality and supported by current browsers, which makes it a good choice for websites.
- PNG: best for screenshots, logos and anything with sharp edges or transparency. It is lossless, so files stay large for photos. Converting a photo from JPG to PNG makes it bigger without adding quality.
A simple routine
- Open the image compressor and add your images.
- Set the longest side to what the page needs.
- Leave quality near 75 and check a result at full size.
- Raise it a little if you see artefacts, or lower it if it looks perfect.
- Compare the sizes shown and download the results.
Mistakes to avoid
- Compressing the same file again and again. Each lossy save loses a little more. Always start from the original.
- Throwing away your originals. Keep them somewhere safe.
- Judging by a thumbnail. Check at the size people will really see.
A side effect worth knowing
Because the image is saved again from its pixels, camera details and GPS location are not carried over to the compressed copy. That is helpful for privacy, but keep the original if you need the data.