Images are typically the largest assets on a web page, often accounting for 60-80% of total page weight. Optimising them is the single most impactful thing you can do for page load speed, which directly affects user experience, bounce rate, and search rankings.

Right-Size Your Images

The most common mistake is serving images that are much larger than needed. A 4000×3000 pixel photo (12 megapixels) served at 400×300 display size is 100x larger than necessary. Always resize images to the maximum display dimensions before uploading.

Calculate the maximum size you need: display width × 2 for Retina displays. If an image displays at 800px wide, serve a 1600px wide image. Don't serve larger than necessary.

Choose the Right Compression

For each image, find the compression level where quality loss becomes noticeable, then back off slightly. The sweet spot is usually:

Lazy Loading

Images below the fold don't need to load immediately. Add loading="lazy" to defer their loading until the user scrolls near them:

<img src="hero.jpg" alt="Above the fold">
<img src="photo2.jpg" alt="Below the fold" loading="lazy">
<img src="photo3.jpg" alt="Further down" loading="lazy">

This is supported by all modern browsers and can reduce initial page load by 30-50% on image-heavy pages. For the hero image (above the fold), don't use lazy loading — load it immediately.

Responsive Images with srcset

Serve different image sizes for different screen widths. A mobile user doesn't need a 1920px wide hero image on their 375px screen:

<img srcset="photo-640.jpg 640w,
             photo-960.jpg 960w,
             photo-1280.jpg 1280w,
             photo-1920.jpg 1920w"
     sizes="(max-width: 768px) 100vw, 50vw"
     src="photo-960.jpg"
     alt="Responsive photo">

The browser automatically downloads the most appropriate size based on the device's screen width and the sizes attribute. This can save hundreds of kilobytes on mobile devices.

Use CDN Image Optimisation

CDNs like Cloudflare, Cloudinary, and Imgix can automatically:

If you're using Cloudflare (as this site does), image resizing is available on Pro plans and above. For free plans, optimise images locally before uploading.

Background Images

CSS background images can't use srcset or loading="lazy". For responsive backgrounds, use the image-set() function:

.hero {
  background-image: image-set(
    url("hero-640.webp") 1x,
    url("hero-1280.webp") 2x
  );
}

Measuring Image Performance

Use these tools to identify image optimisation opportunities:

Quick Wins Checklist

The image tool on this site lets you resize, crop, compress, and convert images — all in your browser. Upload an image, adjust settings, and download the optimised result. No images leave your device, making it safe for personal or confidential photos.