Image SEO (image optimization) is the set of practices that help images appear in Google Search and Google Images while keeping page load time low. It covers alt text, file names, image formats, how images are embedded in HTML, and compression.
How does image SEO work?
Google’s image documentation names a few concrete practices.
- Alt text. Google calls it the most important attribute for giving an image metadata. It should describe the image and avoid keyword stuffing.
- File names. Short and descriptive, for example
my-new-black-kitten.jpginstead ofIMG00023.JPG. - HTML. Images belong in
<img>elements. Google does not index CSS background images. For different screen sizes,srcsetor<picture>work, each with a fallbacksrc. - Formats. Google Search supports BMP, GIF, JPEG, PNG, WebP, SVG and AVIF.
- Context. Images should sit near text that relates to them. Page title and description add context.
- Discovery. An image sitemap can help Google find images, and
og:imageor structured data can mark a preferred image.
The other half is speed. Large files slow a page down, and Google advises serving high-quality but efficiently compressed images. It does not publish target file sizes, so numbers like “under 100 KB” are rules of thumb from third parties.
Many top-ranking pages for “image optimization” are tools or CDN products that compress images automatically. They cover compression and delivery, while Google’s own guidance also covers indexing and context.
Example
<picture>
<source srcset="kitten.avif" type="image/avif">
<img src="kitten.jpg" alt="Black kitten sleeping on a sofa"
width="800" height="533" loading="lazy">
</picture>
Common mistakes
- Alt text made of keyword lists
- Important images loaded only as CSS backgrounds
srcsetwithout asrcfallback- Camera file names such as
DSC_1234.jpg - Missing alt text on images that carry content
Checklist
- Every image that matters is embedded as an
<img>element with asrc(Google does not index CSS background images). - Alt text describes the image briefly and contains no keyword lists.
- The file name is short and descriptive, for example
my-new-black-kitten.jpg. - The format is BMP, GIF, JPEG, PNG, WebP, SVG or AVIF, and the file extension matches the format.
srcsetor<picture>markup includes a fallbacksrc.- The image sits near matching text, and page title and description support the topic.
- Images that Google may not find on its own are listed in an image sitemap.
widthandheightare set so the browser can reserve space (web.dev, avoiding layout shifts).- File weight has been checked. Google gives no target size; practical experience: do not serve images larger than they are displayed.
FAQ
What is image optimization? It means preparing images so they load quickly and can be understood by search engines, through format, compression, file name, alt text and markup.
Is there an ideal file size? Google gives no figure. The right size depends on the image’s display dimensions and the page.
Sources
- Google Image SEO best practices – Google Search Centraldevelopers.google.com
- Serve images in modern formats (WebP) – web.devweb.dev
Last updated: