
Quick answer
Image SEO is the work of helping Google find, understand, and show the pictures on your pages. Google picks up images from the src attribute of HTML img elements, then reads the alt text, file name, caption, and nearby text to decide what each one shows. Images added only as CSS backgrounds are not indexed at all.
The technical side is a short list. Use a supported format such as WebP or AVIF, serve responsive sizes with srcset, lazy-load only images below the fold, list hard-to-find images in an image sitemap, and add structured data where your page type supports it. Google says Lens handles more than 20 billion visual searches a month, so camera searches can surface these images too.
- Discovery: Google indexes images in img elements, and it does not index CSS background images.
- Meaning: Alt text is the most important image attribute, followed by the file name and the surrounding text.
- Delivery: Modern formats, srcset, and smart lazy loading keep images fast without hiding them from Google.
Most small business sites we audit treat images as decoration. The photos are there, but they’re named IMG_4471.jpg, they have no alt text, and half of them sit in a slider that loads as a CSS background. Google can’t do much with that. A few hours of cleanup usually fixes it, and the fixes are almost all technical.
This guide covers the technical side: how Google discovers images, what it reads, which formats and markup to use, and how to keep image delivery fast. If you want the other half of the story (original photography, product shots, and how image quality affects sales), read our companion post on high-quality images in SEO and conversion rate.
How Google finds and reads your images
Google’s image documentation is direct about discovery: it finds images in the src attribute of img elements, including img elements inside a picture element. It does not index CSS images. That means a hero photo set with background-image in your theme’s stylesheet is invisible to Google Images, no matter how good the photo is. If an image matters for search, it needs to be a real img element in the HTML.
One smaller rule from the same page: if the same image appears on several pages, reference it with the same URL every time so Google can cache it.

Alt text
Google calls alt text the most important attribute for providing image metadata. Describe the photo plainly: “Technician replacing a split AC unit on a rooftop in Guaynabo” tells Google and screen reader users far more than “AC” or “image1.” Use your keyword only when it describes the picture. Google warns that stuffing alt text with keywords gives users a poor experience and can get a site treated as spam. Alt text also counts for accessibility, which we cover in the principles of web accessibility.
File names
File names give Google a light clue about the subject. Google’s own example compares my-new-black-kitten.jpg with IMG00023.JPG, and the first one wins. Rename files before you upload them, use hyphens between words, and keep names short. If you publish a Spanish version of a page with its own images, translate those file names as well. Google specifically recommends localizing file names when you localize images.
Placement, captions, and nearby text
Google also pulls meaning from the page around the image: the title, headings, captions, and the paragraph next to it. Put the image near the text it supports, on a page that’s actually about that subject. A photo of a finished kitchen remodel belongs on your kitchen remodeling page, with a caption naming the neighborhood and the work done.
Choosing an image format
Google Search supports BMP, GIF, JPEG, PNG, WebP, SVG, and AVIF images. The file extension should match the actual file type. For most business sites, the practical choice comes down to four of them.
| Format | Best for | What to know |
|---|---|---|
| JPEG | Photos when you need maximum compatibility | The most common web format. Fine as a fallback, but usually heavier than WebP or AVIF at the same quality. |
| WebP | Photos and graphics on most sites | Supports lossy and lossless compression plus PNG-style transparency. Typically smaller than a JPEG of comparable quality. |
| AVIF | Large photos where every kilobyte counts | Built on the AV1 video codec and designed to be smaller than JPEG or WebP. Serve it with a fallback for older browsers. |
| SVG | Logos, icons, and simple illustrations | Vector, so it stays sharp at any size. For inline SVGs, add a title element so screen readers get a description. |
Responsive images and lazy loading
A phone doesn’t need the 2,400 pixel wide photo your desktop layout uses. The srcset and sizes attributes let you list several widths of the same image and let the browser choose. The picture element goes further, letting you offer AVIF first, WebP second, and JPEG last. Google’s guidance has one firm rule here: always include a regular src on the img element as a fallback, because some browsers and crawlers don’t understand srcset or picture.
Lazy loading delays offscreen images until the visitor scrolls near them. Modern browsers do this natively when you add loading=”lazy” to an img element, with no script required. Use it for images further down the page and leave it off the main image at the top. The web.dev team is clear that images likely to be in view on load, especially the Largest Contentful Paint image, should not be lazy-loaded. Also set width and height attributes on every img element so the browser can reserve space and the layout doesn’t jump.
One warning about older JavaScript lazy-load plugins: Google Search doesn’t scroll or click on your page. If a plugin only loads images after a scroll event, Google may never see them. Google lists browser built-in lazy loading among the methods that don’t depend on user actions, so the native attribute is the safer choice.
Image sitemaps
An image sitemap tells Google about images it might not find on its own, such as images loaded by JavaScript. You can add image entries to your existing sitemap. Each page URL can list up to 1,000 images, and the only required tags are image:image and image:loc. Google has dropped the old caption, title, geo_location, and license tags from its documentation, so there’s no need to fill them in. Images hosted on a CDN or another domain are allowed, as long as you verify both domains in Search Console.
Structured data, preferred images, and licensing
When a page has several images, you can tell Google which one represents it. Google lists three ways: the schema.org primaryImageOfPage property, the image attached to the page’s main entity, or the og:image meta tag. Pick a relevant, high-resolution image and avoid logos, images full of text, and extreme aspect ratios. For Google Discover, Google asks for images at least 1,200 pixels wide and the max-image-preview:large setting.
Structured data for products, recipes, articles, and similar types can also make images eligible for rich results and badges in Google Images. If you own original photos and license them, image license metadata can earn a Licensable badge. You can add it with structured data on the page or with IPTC photo metadata embedded in the file. For structured data, contentUrl plus at least one of creator, creditText, copyrightNotice, or license is required, and the license property is needed for the badge itself.
Google Images and Google Lens
Lens adds another way in: people point a camera at a product, a plant, or a storefront and search with the picture. Google reported more than 20 billion Lens visual searches a month. Clear, original photos of your actual products, menu items, and location, with accurate alt text and captions, give those searches something to match. A stock photo that appears on 5,000 other sites gives them nothing that points to you.
Image SEO do’s and don’ts
| Do | Don’t |
|---|---|
| Use real img elements for images that matter in search | Put key photos in CSS backgrounds or sliders that Google can’t index |
| Write specific alt text that describes what’s in the photo | Stuff alt text with keywords or repeat the page title |
| Rename files with short, descriptive, hyphenated names | Upload camera names like IMG_4471.jpg or image1.jpg |
| Serve WebP or AVIF with srcset and a src fallback | Ship one huge JPEG to every screen size |
| Lazy-load images below the fold | Lazy-load the hero image or the LCP image |
| Set width and height on every img element | Let images push content around while they load |
| List JavaScript-loaded images in an image sitemap | Fill in the deprecated caption, title, or license sitemap tags |
| Mark a representative image with og:image or schema | Use your logo as the preferred image for every page |
A 20-minute image audit you can run today
- Open your three most important pages and right-click the main photo. If you can’t open the image in a new tab, it’s probably a CSS background, so move it into an img element.
- Run each page through PageSpeed Insights and note which image is flagged as the Largest Contentful Paint element.
- Check the alt text on every image with a browser extension or by viewing the page source. Rewrite empty or generic ones.
- Look at the file names in your media library. Rename the ones on key pages before reuploading.
- Confirm your images serve as WebP or AVIF, and that phones receive a smaller file than desktops.
- Make sure loading=”lazy” is missing from the top image and present on images further down.
- In Search Console, open the Performance report and filter Search type to Image to see which images already earn clicks.
Get help with your image setup
Most of these fixes live in your theme or CMS settings, which is where small sites tend to get stuck. Our SEO services cover image indexing, sitemaps, and structured data, and our web development team can rebuild templates that rely on background images. If you want help with any of this, tell us about your project.
Sources
- Google Search Central: Image SEO best practices
- Google Search Central: Image sitemaps
- Google Search Central: Image license metadata
- web.dev: Browser-level image lazy loading
- web.dev: Learn Images, AVIF
- Google: Lens on iOS and AI Overviews
Frequently asked questions
Does Google index background images set in CSS?
No. Google’s image documentation states that it doesn’t index CSS images and finds images through the src attribute of img elements. If a photo should appear in Google Images or support the page’s ranking, place it in the HTML as an img element.
How long should alt text be?
Google doesn’t set a character limit for alt text. It asks for useful, information-rich descriptions that use keywords naturally and fit the page’s context. In practice, one clear sentence describing what the image shows is enough for most photos.
Should I convert all my images to WebP or AVIF?
For photos, yes in most cases, because both formats are typically smaller than JPEG at similar quality. Google Search supports both. If you serve AVIF, use the picture element with a WebP or JPEG fallback so older browsers still display the image.
Do I need a separate image sitemap?
Not necessarily. You can add image tags to your existing sitemap, or create a separate one if that’s easier to manage. It’s most useful for images Google might not discover on its own, such as those loaded with JavaScript, and each page URL can list up to 1,000 images.
Can lazy loading hurt image SEO?
It can if it’s set up badly. Native lazy loading with the loading attribute is fine for images below the fold, but the main image at the top should load normally. Avoid older scripts that wait for a scroll event, because Google Search doesn’t scroll or click on pages.




