How to Compress Images for a Faster Website
To make images load faster on your website, do three things to each one before you upload it: resize it to roughly the width your page actually shows, save it as WebP, and set the quality to around 70 to 80%. Then compare the new file size with the original. On a typical phone photo, resizing alone often removes most of the weight.
Images are usually the heaviest part of a web page. A blog post with five full-size phone photos can ask every visitor to download many megabytes before the page settles. Shrinking them is one of the simplest speed improvements you can make, and it needs no technical knowledge.
Step 1: resize first
A modern phone takes photos around 4000 pixels wide. Most web pages show images much narrower than that: a blog's text column, a product image on a shop page, a thumbnail in a grid. Whatever the browser can't show is wasted download.
So work out roughly how wide the image appears on your page. Your site theme's documentation often says, or you can check in the browser: right-click the image, choose Inspect, and look at the displayed size. Then allow for sharp screens. Many phones and laptops pack two device pixels into each display pixel, so an image shown 600 pixels wide looks crisp at about 1200 pixels. Google's web.dev guide on image performance makes the same point: match the image to its display size, adjusted for the screen's pixel density, and note that going much beyond double brings little visible benefit.
As a rule of thumb, a max width of 1200 to 1600 pixels covers most blog posts, online shops and listing sites. Smaller spots like thumbnails or team photos can be much smaller.
Step 2: choose WebP
WebP is an image format made for the web. It usually gives a smaller file than JPEG at a similar look, and it keeps transparency, which JPEG can't. All modern browsers show it, so it's a good fit for your own site. web.dev and MDN both recommend modern formats like WebP for this reason.
There are two cases where something else is better:
- Your website platform rejects WebP. Some older systems and upload fields still don't accept it. Use JPEG for photos instead.
- Screenshots, logos and graphics with sharp text. These can look fuzzy around the edges with lossy compression. PNG is lossless, meaning it keeps every pixel exactly, so it's safer for crisp graphics. Try WebP first and compare; if the text looks blurry, switch to PNG.
Step 3: set the quality to 70–80%
"Quality" controls how much detail the format is allowed to throw away to make the file smaller. At 100% very little is discarded and files are large. Lower settings remove more fine detail that most people won't notice.
Start at 80%. For most photos you won't see a difference from the original, and the file drops a lot. If you need it smaller, go down in steps of 5 and check each time. Around 60 to 70% is often still fine for a phone screen. Below that you may start to see blocky patches in skies and smooth skin.
Whatever you choose, look at the result. As web.dev puts it, when using lossy compression, always confirm that the compressed image meets your quality standards.
Doing it with Image Compress
Image Compress handles all three steps in one screen:
- Click the upload area and pick one image. PNG, JPG and WebP work, as does any other image type your browser can open.
- Choose the output format. WebP is selected when you start.
- Move the Quality slider. It starts at 80% and goes from 10% to 100%. It only applies to JPEG and WebP; PNG ignores it.
- Type your target width into Max width, for example 1400. The height is scaled to match, so nothing gets stretched. Leave it at 0 to keep the original size.
- Check the four boxes under the controls: original size, compressed size, percentage saved and final dimensions. The preview updates a moment after each change.
- Click Download. The file gets
-compressed added to its name.
Use the Saved figure to decide
The percentage saved is your quick measure. Try a few combinations and watch it move:
- Change the max width first. On a large phone photo, this is usually the biggest jump.
- Then nudge the quality down in steps of 5 and see how much more it saves. When each step only saves a little, stop. You've reached the point where further loss isn't worth it.
- If the Saved box turns red, the new file is bigger than the original. That happens when the original was already well compressed or when you've picked PNG for a photo. Lower the quality or switch format.
Rename the file before uploading. A descriptive name such as blue-ceramic-mug.webp is clearer for you and for anyone who sees the image address.
Habits that keep a site fast
- Keep your originals. Compressing the same JPEG again and again loses a bit more detail each time. Always start from the original file.
- Crop before you compress. If only part of the photo matters, trim it with Image Crop first. Fewer pixels, smaller file.
- Don't rely on the site to shrink images for you. Some platforms create smaller versions automatically, which helps. But uploading a sensibly sized file in the first place keeps your storage down and avoids surprises in places that show the original.
- Watch transparent cut-outs. PNGs from a background remover can be large. Converting them to WebP keeps the transparency and usually cuts the size.
- Lazy loading for long pages. If you or your developer can edit the page's HTML, adding
loading="lazy" to images further down the page tells the browser to fetch them only when the reader scrolls near them. Many website platforms already do this.
What Image Compress doesn't do
It works on one image at a time; there's no batch mode. For a whole media library, a plugin or build tool on your website platform is a better fit. Max width can only make images smaller, so it won't rescue a photo that's already too small. Very large images can be slow on older phones, because the work happens on your device.
That last point is also an advantage. The tool uses the image encoder built into your browser, so your files aren't sent to our server and there's no upload wait.
If your pages still feel slow after the images are trimmed, the cause is likely elsewhere: heavy scripts, web fonts or hosting. A free speed test such as PageSpeed Insights will show which parts of the page take longest.
KhanTools — Free Online Web Tools
Free browser-based tools for images and PDFs. No uploads. 100% private.
Blog ·
About ·
Privacy Policy ·
Terms of Service ·
Contact
JavaScript is required to use KhanTools. Please enable JavaScript in your browser.