Reference guide · images · Published 2026-08-14 · 3 min read

Image optimisation guide

How to choose an image format, compress without visible loss, resize to the render size, and deliver images fast with srcset, dimensions, lazy loading and CDN caching.

Why it matters

Images are usually the largest single source of page weight. On a typical marketing site they outweigh every script, stylesheet, and font combined. Optimising images is the cheapest and most predictable way to improve LCP, reduce bandwidth, and speed up mobile pages. The full chain is: right format, right size, right compression, and fast delivery.

Choose a format

Rule of thumb: if it is a photo, use a modern format such as WebP or AVIF; if it is a graphic, use a modern format if it helps, otherwise keep PNG; if it is an icon or logo, use SVG.

Compress

Compress at export time, not in the browser. Tools such as cwebp, oxipng, pngquant/optipng, jpegtran, svgo, and sharp produce files a fraction of the original. Target a quality that is visually indistinguishable, usually around quality 75 to 85 for JPEG and WebP photos. A 2.4 MB photo becomes roughly 200 to 400 KB in WebP without visible loss.

Set concrete thresholds and guard them in the build: if an original is over about 1 MB, warn or convert automatically, because a hero image over about 500 KB is almost always a mistake.

Deliver fast

Verify

After re-exporting, compare the new page weight and LCP in Lighthouse or PageSpeed Insights against the baseline from the same tool. A good check: total page weight should drop, and the hero image should be the image doing the least wasted work. Re-run after every asset change because these gains evaporate the moment a designer uploads a raw export into the CMS.

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services