Image SEO: Alt Text, File Formats and Image Search
Image SEO is getting images found, understood and loaded fast. Use real img tags, useful alt text, clear file names, WebP or AVIF at the right size and an image sitemap. Here is the full checklist.
Image SEO means helping search engines find, understand and quickly load your images. Place images with real img tags. Write alt text that describes what the image shows. Use short descriptive file names. Serve WebP or AVIF at the size the page needs, lazy load only below the first screen, and add an image sitemap when crawlers might miss images.
Images bring visitors from Google Images, help pages rank and convert, and now feed AI answers too. Google's own guide to generative AI features says that if you follow its image SEO practices, "you're already optimizing for generative AI search."
This post covers discovery, alt text, file names, formats, speed, sitemaps and the page's lead image, with a worked example.
Key takeaways
- Use img tags. Google doesn't index CSS background images, so anything that matters needs a real img element.
- Alt text describes, not stuffs. Say what the image shows in a short phrase, using a keyword only if it fits.
- Format and size first. WebP or AVIF at the right width cut most image weight before any other fix.
- Lazy load below the fold only. Images seen on first load should load right away.
- Pick the page's image. Set og:image to a clear, relevant picture, not a logo or a text graphic.
How does Google find and understand images?
Google's image SEO best practices are the source of truth here. The first rule is simple. Google finds images in the src attribute of img elements. In its words, "Google doesn't index CSS images."


So a product photo set as a CSS background never reaches Google Images.
To understand an image, Google reads more than the file. The same page says Google "uses alt text along with computer vision algorithms and the contents of the page to understand the subject matter of the image." That's why where you place an image matters. Put it near the text it supports, on a page about that subject.
| Signal | What Google reads | What to do |
|---|---|---|
| The img element | The src URL | Use img or picture, never CSS backgrounds, for images that matter |
| Alt text | A text description | Describe the subject in a short phrase |
| File name | Words in the URL | Use short descriptive names with hyphens |
| Nearby text | The caption and paragraph around it | Place images next to the text they support |
| The page itself | Title, headings and topic | Put images on pages about the same subject |
| Structured data | Image fields in schema | Add the image property where the schema type supports it |
Google also asks that you reuse the same URL for an image across pages, so it can cache it once.
How do you write good alt text?
Alt text describes the image for screen reader users and for search engines. Google calls it "the most important attribute" for image metadata.
Google's own example makes the point. A missing alt is bad. An alt stuffed with a long list of dog words is bad, and Google says keyword stuffing "may cause your site to be seen as spam." "puppy" is better. "Dalmatian puppy playing fetch" is best. It names the subject and what it's doing.
Here's the formula I use: subject, plus the detail that matters on this page, plus context if it helps.
| Image | Weak alt | Strong alt |
|---|---|---|
| Product photo | "shoe" | "Navy trail running shoe, side view with grip sole" |
| Team photo | "team" | "Five support agents at a shared desk with headsets" |
| Screenshot | "dashboard" | "Pipeline report showing deals by stage for one quarter" |
| Chart | "chart" | "Bar chart of monthly signups, January to June" |
| Logo in the header link | "logo" | "Acme home page" |
| Decorative divider | "divider line" | Empty alt (alt="") |
When should alt text be empty?
The W3C's alt decision tree is the best rule set I know. Decorative images get an empty alt attribute. An image inside a link or button should describe where the link goes or what the button does. An image of text should carry that text in the alt, unless the same text sits on the page already. And for a complex chart, put the information in the page text, not only in the alt.
That last rule helps SEO too. Write a chart's key numbers in a sentence near it.
What file names and formats should you use?
File names are a small signal, but they're free. Google's guide prefers names like "my-new-black-kitten.jpg" over "IMG00023.JPG." Use lowercase words with hyphens, and rename files before you upload them.
For format, Google supports BMP, GIF, JPEG, PNG, WebP, SVG and AVIF in search. It also asks that the file extension match the file type.
| Format | Best for | Notes |
|---|---|---|
| WebP | Photos and most web images | Google says lossy WebP is 25 to 34% smaller than comparable JPEGs |
| AVIF | Photos where every kilobyte counts | Supported in Google Search; keep a fallback for older browsers |
| JPEG | A safe fallback for photos | Bigger than WebP at the same quality |
| PNG | Images needing exact pixels, like some screenshots | Lossless WebP is 26% smaller, per Google |
| SVG | Logos, icons and simple illustrations | Scales cleanly and stays small |
| GIF | Short animations, only if you must | Large files; a short video loop is usually lighter |
The WebP numbers come from Google's WebP overview. It also says adding transparency to a lossless WebP costs "just 22% additional bytes" over the lossless file.
How do you keep images from slowing the page?
Images are often the heaviest thing on a page, and page experience matters to Google. The Core Web Vitals guide covers the metrics.
Three habits cover most of it.
- Right-size every image. Don't ship a 4,000-pixel photo into a 600-pixel slot. Use srcset or picture to serve the right width per screen. Google asks that you always include a fallback src on the img element.
- Compress and convert. Move photos to WebP or AVIF. Most build tools and image CDNs do this for you.
- Lazy load with care. Google's guide to lazy-loaded content supports the browser's built-in lazy loading for images. It also warns against lazy loading content that's visible on first load. Your hero image should load right away.
After any change, run the page through URL Inspection in Search Console. Google's lazy loading guide says image URLs should show up in the src attributes of the rendered HTML. If they don't, Google may not see them.
On Next.js, the built-in image component handles sizes and formats. The Next.js SEO guide covers it.
Worked example: a product page that cut its image weight by 71%
Say an online store's product page carries 12 camera JPEGs, resized by the browser. Together they weigh 4.8 MB, and the main photo appears late on mobile.


Step one is conversion. Moving the photos to WebP at the same quality trims about 30%, in line with Google's 25 to 34% figure. The page drops to 3.4 MB.
Step two is right-sizing. Most images display at 800 pixels wide or less, but they were 3,000 pixels wide. Serving the right width through srcset brings the total to 1.4 MB.
Step three is loading order. The main product photo loads right away. The other 11 images lazy load as the shopper scrolls. So the first screen needs only a fraction of the 1.4 MB.
The page went from 4.8 MB to 1.4 MB, about 71% less image weight, with no visible loss in quality.
The ecommerce category page SEO guide covers the rest of a store page.
Do you need an image sitemap?
Often not. An image sitemap helps when images load in ways crawlers might miss, or when they live on a CDN on another domain.
Google's image sitemap docs keep it simple. You add image tags to your normal XML sitemap. Each page entry can list up to 1,000 images. Only the image location tag is still needed. Google removed the caption, title, geo location and license tags from its documentation.
<url>
<loc>https://www.example.com/trail-shoes/navy</loc>
<image:image>
<image:loc>https://cdn.example.com/navy-trail-shoe-side.webp</image:loc>
</image:image>
</url>
The XML sitemap guide covers the rest of the file. Also check that your robots.txt doesn't block your image folder or CDN. Google's image crawler answers to the Googlebot-Image token. The robots.txt guide shows the safe setup.
Which image represents the page?
You can suggest which image Google uses as a page's thumbnail. Google's image guide names two ways: the og:image meta tag, or schema.org markup such as primaryImageOfPage. Pick a relevant, high-resolution image.
Google also says what to avoid there: generic images like your site logo, images with text, and extreme aspect ratios. The same og:image is what most social and chat apps show when someone shares your link. So one good image does two jobs.
Schema markup with an image property can also make images eligible for badges and rich results in Google Images. The guide on schema for AI search covers which types are worth adding. Pair that with a strong title and description, as the meta title and description guide shows.
Common image SEO mistakes
These turn up in almost every technical SEO audit I run.
- Product photos as CSS backgrounds. Google can't index them. Use img tags.
- Alt text stuffed with keywords. It reads badly and risks a spam signal. Describe the image.
- Camera file names. "IMG_4471.jpg" says nothing. Rename before upload.
- Full-size uploads. A 3,000-pixel image in an 800-pixel slot wastes most of its bytes.
- Lazy loading the hero. It delays the first thing people see.
- Charts with numbers only in the image. Write the numbers in the text too.
- A logo as the og:image. Google asks for a relevant picture, not a generic one.
Video has its own rules, covered in the YouTube SEO guide.
What to do this week
Pick your ten most visited pages and fix the images on those first.
Image SEO is part of on-page SEO and part of technical SEO, so it fits into the on-page SEO checklist. Images also show up in SERP features and support pages cited in AI Overviews, which the AI Overviews guide covers. If your store or site needs this done at scale, see our ecommerce work, our website builds or the SEO and AEO service.
FAQ
What is image SEO?
Image SEO is the work of helping search engines find, understand and quickly load the images on your pages. It covers the HTML you use to place images, alt text, file names, file formats and sizes, lazy loading, image sitemaps and the image you choose to represent a page. Done well, it brings traffic from Google Images and supports rankings in regular results.
How long should alt text be?
Long enough to describe what matters in the image, and no longer. For most photos that's a short phrase or one sentence. Describe the subject and what it shows, like a breed and an action rather than just an animal. For a chart, put the key numbers in the page text and keep the alt short.
What is the best image format for SEO?
Google supports BMP, GIF, JPEG, PNG, WebP, SVG and AVIF. For photos, WebP or AVIF usually give the smallest files at good quality. Google says lossy WebP is 25 to 34% smaller than comparable JPEGs. Use SVG for logos and icons, and keep a fallback through the picture element if you serve newer formats.
Does Google index CSS background images?
No. Google's image SEO documentation says it finds images in the src attribute of img elements and doesn't index CSS images. If an image matters for search, such as a product photo or a diagram, place it with an img tag. Keep CSS backgrounds for decoration.
Should I lazy load all images?
No. Lazy load images below the first screen, and load the images people see right away normally. Google warns that lazy loading content visible on first load delays it. Use the browser's built-in loading attribute, and check in Search Console's URL Inspection tool that image URLs appear in the src attributes of the rendered HTML.
Do I need an image sitemap?
Not always. Google finds most images by crawling your pages. An image sitemap helps when images load in ways crawlers might miss, or sit on a CDN on another domain. Each page entry can list up to 1,000 images, and only the image location tag is still needed. Older tags like caption and title were removed from Google's docs.