Analytics, SEO and growth · Concept

Image optimisation

Serving every image as a small, modern file at the right size for the visitor's screen, which is one of the simplest ways to make a site load faster.

Speed · updated

How it works

Images are usually the heaviest part of a page. The main techniques are modern formats (WebP and AVIF files are typically much smaller than JPEG or PNG at similar quality), resizing to the displayed size with srcset and sizes so phones never download desktop-sized images, sensible compression, lazy loading for images below the fold with loading='lazy', and SVG for logos and icons.

Setting width and height, or an aspect ratio, reserves space and prevents layout shift. The main hero image is often the page's LCP element, so it should load early rather than lazily, often with fetchpriority='high'. Much of this can be automated: next/image in Next.js, Astro's image component, image CDNs such as Cloudinary, imgix or Cloudflare Images, and libraries such as sharp in a build step.

More in Analytics, SEO and growth

Speed

All 20 Analytics, SEO and growth terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.