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.webpsays more thanIMG_4721.webp. - Use standard HTML
<img>elements with asrc. 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
widthandheight(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
- An image sitemap, or image entries in your XML sitemap, can help Google discover images it might not find otherwise.
- Structured data such as Product or Recipe can show images in rich results; see Structured data: which schema types are worth adding.
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.