How to Compress Images for a Faster Website

By Administrator · · Updated Nov 25, 2026

Illustration of a large photo being compressed into a smaller file

Images often make up more than half of a web page’s total size. Compressing them is one of the easiest ways to improve loading speed, Core Web Vitals and search rankings.

1. Resize before you compress

A photo straight from a phone can be 4000 pixels wide, but most websites display images at 1200 pixels or less. Use an image resizer to match the largest size the image will actually be shown at.

2. Choose the right format

  • WebP – usually the smallest for photos and graphics, supported by all modern browsers.
  • JPG – good for photos when maximum compatibility is needed.
  • PNG – best for screenshots, logos and images that need transparency.

You can switch formats with our image converter.

3. Pick a sensible quality

For most photos, a quality of 70–80% looks almost identical to the original but is several times smaller. Our image compressor shows the size saved so you can find the right balance.

4. Set width and height and lazy-load

Always add width and height attributes to images so the browser can reserve space and avoid layout shift (CLS). Add loading="lazy" to images below the fold so they only load when needed.

5. Check the results

After optimising your images, test the page with PageSpeed Insights. Look at Largest Contentful Paint (LCP) – it should be under 2.5 seconds. If the largest element is an image, make sure it is not lazy-loaded (it should load straight away) and that it is the right size for the screen.

A quick example

A blog post with five 3 MB phone photos weighs about 15 MB. Resizing them to 1200 pixels wide and saving them as WebP at 75% quality usually brings each one down to around 120–200 KB – under 1 MB in total. On a typical mobile connection that can make the page load several seconds faster.

Common mistakes to avoid

  • Uploading the original camera file and letting the browser shrink it.
  • Saving photos as PNG, which is lossless and much larger for photographs.
  • Compressing the same JPG again and again, which adds visible blocky artefacts each time.
  • Forgetting alt text, which helps screen-reader users and image search.

Following these steps can easily cut image weight by 70% or more.

More articles