Skip to content

Image SEO: alt text, file names, formats and image search

How search engines understand images, what to write in alt text, which formats and sizes to use, and how to make images load fast.

· 2 min read

Images help readers, can bring visitors from image search, and are often the largest part of a page's weight. Getting them right is mostly a matter of good habits.

Help search engines understand the image

Search engines use several signals to understand an image: the text around it, the page's title and headings, the file name, and the alt text.

  • Place images near related text, not in a separate gallery with no context.
  • Use descriptive file names: blue-trail-running-shoe.webp says more than IMG_4721.webp.
  • Use standard HTML <img> elements with a src. Images loaded only as CSS backgrounds are not indexed as images.

Write useful alt text

Alt text is read aloud by screen readers and shown when an image cannot load, and Google uses it to understand the image.

  • Describe what the image shows in the context of the page, in a short phrase or sentence.
  • Do not stuff keywords. A list of keywords is unhelpful for people using screen readers, and Google's guidance warns against it.
  • Purely decorative images can have an empty alt attribute (alt="") so screen readers skip them.

Choose the right format and size

  • Modern formats such as WebP and AVIF are usually much smaller than JPEG or PNG at similar quality. Google supports both for indexing.
  • Serve the size that is displayed. A 4000-pixel photo shown 800 pixels wide wastes bandwidth; responsive images (srcset) let the browser pick a suitable size.
  • Compress images before upload; most CMSs and build tools can do this automatically.

Make them load well

  • Set width and height (or reserve space with CSS) so the layout does not shift while images load; this protects your CLS. See Core Web Vitals explained.
  • Lazy-load images below the fold with loading="lazy", but not the main image at the top of the page, which is often the Largest Contentful Paint element.

Image search extras

Check the images on your key templates with PageSpeed Insights, which flags oversized and badly formatted images. Questions about a large image library? Ask in the Content and on-page community.

Comments (0)

Sign in to join the discussion.