What Google image indexing requires of your alt text
Google indexes images using three signals: the alt attribute, the page text, and computer vision. I break down what Google's image indexing rules actually require, how long alt text should be, and the markup mistakes that quietly keep your images out of search.
Google images rank best when each image lives in the src attribute of an <img> element, uses a supported file format, and carries an accurate alt attribute between 50 and 125 characters. CSS background images are never indexed, and keyword-stuffed alt text is a spam signal.
I went back through Google's image SEO documentation last month after a client's product photos stopped appearing in image search. The fix had nothing to do with copywriting. It came down to a handful of technical requirements Google states plainly in their docs, and most alt text advice online ignores half of them.
Google's indexing requirements
Google needs to find the image in a standard HTML element, in a supported format, on a page relevant to what the image shows. The Google Search Central image SEO docs spell this out:
- The image has to live in the
srcattribute of an<img>element. Google finds it even when the<img>sits inside a<picture>element. - Google does not index CSS background images. If your hero or product shot is a
background-imagein CSS, it does not exist as far as image search is concerned. - The file has to be a supported format: BMP, GIF, JPEG, PNG, WebP, SVG, or AVIF. Google added AVIF support on August 30, 2024.
- The image should sit near relevant text on a page about the same subject.
Alt text is one of three signals Google uses: element structure, surrounding text, and the alt attribute itself. An image with perfect alt text inside a CSS background-image will never get indexed.
Does alt text affect indexing?
Yes. Google uses three signals together to understand an image: the alt text, its computer vision read of the pixels, and the surrounding page content. Alt text is the only signal you control entirely with words.
Google's guidance is to write "useful, information-rich content that uses keywords appropriately and is in context of the content of the page." The same sentence warns against "filling alt attributes with keywords," which Google treats as a spam signal.
So alt text does two jobs: it helps screen reader users understand the image, and it gives Google a text description to match against a query. Both want the same thing — an accurate sentence about what the image shows.
An empty alt attribute throws away the only text signal you fully control, and keyword stuffing turns it into a spam liability that can get your site penalized.
Alt text length in practice
Google does not publish a character limit. The practical ceiling comes from screen readers: JAWS and NVDA both truncate around 125 characters in virtual cursor mode. That is why most accessibility and SEO guides land on roughly 50 to 125 characters as the working range.
A product page selling a kettle does not need "best stainless steel electric kettle fast boiling kitchen appliance buy online." It needs "stainless steel electric kettle with a black handle and water-level window."
Good alt text vs. bad alt text
The question is whether the text describes the image or tries to game a query. On a single product photo:
| Alt text | What Google sees |
|---|---|
alt="" (empty) |
No text signal. Relies on filename and vision only. |
alt="image" or alt="product" |
Generic. Adds nothing. |
alt="kettle kettle electric kettle best kettle 2026" |
Keyword stuffing. Spam signal. |
alt="stainless steel electric kettle with black handle" |
Accurate, specific, matches real queries. |
Decorative images are the exception. If an image is purely visual filler with no information, give it an empty alt="" so screen readers skip it. That empty value is intentional. You set it because the image carries nothing worth describing.
My actual take on alt text vs. computer vision
For most product images, your alt text matters more than Google's computer vision. Vision models can identify the object category but can't distinguish "matte black gooseneck kettle" from "glossy wide-spout kettle" without the text. The queries that convert are specific, and the text signal is what the model can't infer from pixels.
How does lazy loading affect indexing?
Lazy loading is fine. Google recommends it for below-the-fold images as long as the image resolves to a real src Google can fetch. Use loading="lazy" for images outside the first screen and let above-the-fold images load eagerly so they do not drag down Largest Contentful Paint.
The trap is JavaScript lazy-loading libraries that put a placeholder in src and only swap in the real image on scroll. If Google fetches the page and finds a 1×1 placeholder in src, that placeholder is what it indexes. Native loading="lazy" avoids this because the real URL stays in src from the start.
Complete markup:
<picture>
<source srcset="kettle.avif" type="image/avif" />
<source srcset="kettle.webp" type="image/webp" />
<img
src="kettle.jpg"
alt="stainless steel electric kettle with black handle"
width="800"
height="600"
loading="lazy"
/>
</picture>
AVIF and WebP serve the small files. The <img> fallback gives Google a real src in a supported format. The alt text describes the image. Width and height prevent layout shift.
Where image optimization breaks indexing
When you compress or convert images, two things commonly break indexing without anyone noticing. An optimization step pushes the image into CSS, which removes it from image search entirely. An automated pipeline renames files to hashes like a8f3e1.webp, throwing away the descriptive filename Google asks for.
Pixel Wand converts to AVIF and WebP while keeping a JPEG or PNG fallback in the src, so the indexable <img> stays intact, and it leaves your alt text and markup structure alone. Smaller files and faster load times help images rank, but only if the <img> element survives the optimization pipeline.
FAQ
Is alt text required for Google to index an image?
No, alt text is not strictly required. Google can index an image from its filename, surrounding text, and computer vision alone. But alt text is the strongest text signal you control, and images without it rank worse for specific queries.
Does Google index WebP and AVIF images?
Yes. Google supports BMP, GIF, JPEG, PNG, WebP, SVG, and AVIF in the src attribute of an <img> element. AVIF support landed on August 30, 2024. You don't need special markup beyond a standard <img> element.
Will stuffing keywords into alt text help ranking?
No. Google explicitly calls keyword-stuffed alt attributes a spam signal that can cause a site to be treated as spam. Write one accurate sentence describing the image.
Open your most important product or article page, view the source, and check that every meaningful image is a real <img> with a descriptive src, a written alt attribute, and width and height set. The ones that fail this check are your highest-priority fixes.