SEO 2 min read

Image optimisation for websites: WebP, AVIF, lazy loading and alt text

Images are usually the heaviest part of a web page. Learn how to shrink them without losing quality, speed up loading and help them appear in Google Images.

The Wysoko.org team Published:

A large framed photo pressed through a funnel into several small light photos next to a feather and a speedometer

Photos sell, but they often slow sites down too. An image straight from a camera can weigh several megabytes – more than the rest of the page combined. Image optimisation is one of the fastest ways to improve your Core Web Vitals.

Formats

FormatUse
WebPphotos and graphics – much smaller than JPEG/PNG, supported by all modern browsers
AVIFeven better compression, especially for photos; provide a WebP or JPEG fallback
SVGlogos, icons and vector illustrations – sharp at any size
JPEG / PNGfallbacks and images shared on social media

The right size

Do not send a 4,000 px image to an 800 px column. Prepare several variants and let the browser choose:

<img src="photo-800.webp"
     srcset="photo-480.webp 480w, photo-800.webp 800w, photo-1280.webp 1280w"
     sizes="(max-width: 700px) 100vw, 800px"
     width="1280" height="720" alt="A description of what the photo shows">

The images on this site are prepared exactly this way – each has three WebP sizes and a separate JPEG for social sharing.

Loading

  • Lazy loading – loading="lazy" for images below the first screen.
  • No lazy loading for the main image – the image visible straight away (often the LCP element) should load immediately; you can add fetchpriority="high".
  • Dimensions – width and height attributes reserve space and prevent layout shift (CLS).
  • Caching – images rarely change, so browsers can cache them for a long time.

Image SEO

  • Alt text – a specific description of what the image shows and why it is there, without keyword stuffing. Purely decorative images get an empty alt="".
  • File names – descriptive (online-store-cart.webp) rather than IMG_4521.jpg.
  • Context – place images near related text, with a caption where useful.
  • Sitemap – important images can be listed in your XML sitemap.
  • Structured data – include the image in article or product markup.
  • Sharing image – an og:image tag at about 1200×630 px.

Checklist

  • WebP or AVIF, with a fallback where needed.
  • Several sizes with srcset/sizes.
  • Width and height in the markup.
  • Lazy loading below the fold, none for the main image.
  • Descriptive alt text and file names.
  • Rights to every photo – a licence or your own material.

We optimise images for new websites and as part of ongoing support. For the technical big picture, see our step-by-step SEO audit.

Frequently asked questions

Does WebP work in all browsers?

Yes, all modern browsers support WebP. AVIF is also widely supported, but it is worth providing a fallback format.

Does alt text affect SEO?

Yes. It helps search engines understand the image and is essential for accessibility. Describe the image naturally, without keyword stuffing.

Related services

See also

All news

Have a project in mind?

Tell us what you need – we will prepare a free quote.

Get a quote