Images do three jobs for SEO at once. They can bring visitors directly, through Google Images, image results inside the main search page, and visual search with Google Lens. They shape how fast a page feels, because the largest element on most pages is an image. And they help search engines and AI systems understand what a page is about. Most sites get one of those right and neglect the other two.
This guide covers all three. It starts with a quick checklist you can run against any page today, then works through each item in detail: alt text, filenames, formats including WebP and AVIF, responsive images with srcset, lazy loading, the LCP image and fetchpriority, image sitemaps, structured data, and licensing metadata. There are copy-ready code examples throughout, and notes for WordPress and Shopify where they differ.
The Ten-Minute Image SEO Checklist
Pick an important page, open it in your browser and check these. Each links to the section that explains the fix.
| # | Check | Good looks like |
|---|---|---|
| 1 | Alt text | Every meaningful image has a short, specific description; decorative images have alt="" |
| 2 | Filenames | blue-trail-running-shoe.webp, not IMG_4821.jpg |
| 3 | Format | Photos served as WebP or AVIF, with JPEG fallback only where needed |
| 4 | Dimensions | Images are not much larger than the size they are displayed at |
| 5 | Responsive | srcset and sizes so phones get smaller files |
| 6 | Width and height | Every <img> has width and height to prevent layout shift |
| 7 | Lazy loading | Below-the-fold images use loading="lazy"; above-the-fold images do not |
| 8 | LCP image | The hero image is in the HTML, not lazy-loaded, with fetchpriority="high" |
| 9 | Discovery | Images use <img src> (not CSS backgrounds) and are crawlable |
| 10 | Context | Images sit near relevant text and captions, on a page with a descriptive title |
The image alt text checker covers alt text for any URL. The lazy-loading checker and page speed test cover most of the rest.
1. Alt Text: Write for People First
The alt attribute is the text alternative for an image. Screen readers read it aloud, browsers show it when an image fails to load, and search engines use it, together with the surrounding content, to understand what the image shows. Google's image SEO documentation names alt text as the most important attribute for providing metadata about an image.
Google's guidance is to write useful, information-rich alt text that uses keywords appropriately and in context, and to avoid filling alt attributes with keywords, which it says creates a negative user experience and may cause your site to be seen as spam.
<!-- Missing: no information at all -->
<img src="shoe.jpg">
<!-- Too vague -->
<img src="shoe.jpg" alt="shoe">
<!-- Keyword stuffing -->
<img src="shoe.jpg" alt="running shoes trail running shoes best running shoes cheap running shoes">
<!-- Good -->
<img src="shoe.jpg" alt="Blue trail running shoe with a deep-lug rubber sole, side view">
Practical rules:
- Describe what matters in context. The same photo of a chef might be "Head chef plating a tasting menu course" on a restaurant page and "Chef wearing a cut-resistant glove" on a safety equipment page.
- Keep it short. One sentence is usually enough. Screen reader users hear every word.
- Do not start with "Image of" or "Picture of". Screen readers already announce it as an image.
- Use empty alt for decoration. Spacers, background textures and purely decorative icons should have
alt=""so screen readers skip them. Omitting the attribute entirely is different: many screen readers then read out the filename. - Linked images need alt that describes the destination. When an image is the only content of a link, its alt text works like anchor text. A logo linking to the homepage should say "Acme home", not "logo". Our internal linking guide explains why anchor text matters.
- Text in images belongs in alt text. If an image contains words, such as a chart title or an infographic heading, include them. Better still, put important text in HTML so it is searchable and translatable.
- Charts and diagrams deserve a short alt plus a fuller explanation in the surrounding text or a caption.
2. Filenames and URLs
Google's documentation says the filename can give it clues about the subject of the image, and recommends short but descriptive filenames. my-new-black-kitten.jpg is better than IMG00023.JPG. It is a small signal, but it is free, and descriptive names also make your media library easier to manage.
- Use lowercase words separated by hyphens:
oak-dining-table-6-seater.webp. - Avoid underscores, spaces (which become
%20) and non-ASCII characters where you can. If your audience uses another language, it is fine to name files in that language. - Keep image URLs stable. If you rename or move images that already rank in Google Images, redirect the old URLs, as you would a page. The redirects guide covers how.
- Rename before upload. Most CMSs, including WordPress and Shopify, keep the filename you upload in the image URL.
The same logic applies to the page URL itself; the URL slug generator turns titles into clean slugs.
3. Choosing the Right Format
Google's documentation lists the image formats it can index in Google Images: BMP, GIF, JPEG, PNG, WebP, SVG and AVIF. All of them are indexable, so the choice is about file size, quality and browser support.
| Format | Best for | Notes |
|---|---|---|
| AVIF | Photos and complex images where size matters most | Usually the smallest files at a given quality; supported by all current major browsers; slower to encode |
| WebP | A safe modern default for photos and graphics | Supports transparency and animation; supported by all current major browsers |
| JPEG | Fallback for photos | Universal support; larger than WebP and AVIF at similar quality |
| PNG | Screenshots, images needing lossless detail | Large for photos; consider lossless WebP instead |
| SVG | Logos, icons, simple illustrations | Vector, scales to any size, often tiny; sanitise user-uploaded SVGs, as they can contain scripts |
| GIF | Legacy simple animation | Very inefficient; use a short muted video or animated WebP instead |
You can serve modern formats with a fallback using the <picture> element. The browser picks the first source it supports; everyone else gets the <img>:
<picture>
<source srcset="/images/oak-table.avif" type="image/avif">
<source srcset="/images/oak-table.webp" type="image/webp">
<img src="/images/oak-table.jpg"
alt="Six-seater oak dining table in a bright kitchen"
width="1200" height="800">
</picture>
Keep the alt, width and height on the <img>; the <source> elements only swap the file. Many image CDNs and platforms do this conversion automatically by checking what the browser accepts, which saves you from generating each format by hand.
Compression
Format matters less than compression level and dimensions. A 4000-pixel-wide photo saved as WebP is still far too big for an 800-pixel slot. Resize images to roughly the largest size they are displayed at (allowing for high-density screens, around twice the CSS size), then compress. For most photos, a moderate quality setting is visually indistinguishable from the original. The page speed test flags oversized and poorly compressed images, which are often the biggest single share of a page's download.
4. Responsive Images With srcset and sizes
A phone does not need the same file as a 27-inch monitor. The srcset attribute lists several widths of the same image, and sizes tells the browser how wide the image will be displayed at each breakpoint, so it can download the smallest file that looks sharp:
<img
src="/images/trail-shoe-800.webp"
srcset="/images/trail-shoe-400.webp 400w,
/images/trail-shoe-800.webp 800w,
/images/trail-shoe-1200.webp 1200w,
/images/trail-shoe-1600.webp 1600w"
sizes="(max-width: 600px) 100vw, (max-width: 1200px) 50vw, 600px"
alt="Blue trail running shoe with a deep-lug rubber sole, side view"
width="1600" height="1067">
Read sizes as: "on screens up to 600px wide, the image fills the viewport; up to 1200px, it fills half; otherwise it is 600px wide". Always include a plain src as a fallback; Google's documentation recommends it, and some crawlers only read src.
Use <picture> with media attributes only when you need different crops at different sizes (art direction), for example a wide banner on desktop and a square crop on mobile. For simply serving different sizes of the same image, srcset and sizes are enough.
WordPress generates several sizes on upload and adds srcset automatically for images inserted through the editor. Shopify's image CDN can resize on the fly, and its Liquid image_tag filter outputs srcset. Frameworks such as Next.js (next/image) and Astro have image components that handle sizes and formats for you.
5. Prevent Layout Shift With Width and Height
When an image loads without reserved space, the content below it jumps down. That jump counts towards Cumulative Layout Shift (CLS), one of the Core Web Vitals. The fix is to set width and height attributes on every image, matching its aspect ratio. Modern browsers use them to reserve the right space before the file arrives, even when CSS makes the image responsive:
<img src="/images/oak-table.webp" alt="..." width="1200" height="800">
/* CSS */
img {
max-width: 100%;
height: auto;
}
For images whose size is set entirely by CSS, the aspect-ratio property does the same job. The Core Web Vitals guide covers CLS and the other metrics in depth.
6. Lazy Loading: Below the Fold Only
Native lazy loading tells the browser to wait until an image is near the viewport before downloading it:
<img src="/images/review-photo.webp" alt="Customer photo of the shoe after a muddy trail run"
width="800" height="600" loading="lazy">
It is supported in all current major browsers and Google can index natively lazy-loaded images. It saves bandwidth on long pages, product grids and image galleries. Two rules:
- Never lazy-load images in the first screen, and above all not the main (LCP) image. Lazy loading delays the download until layout is known, which makes the most important image appear later.
- Avoid JavaScript lazy-loading libraries that swap a
data-srcintosrcon scroll, unless they also keep a realsrcor a<noscript>fallback. Crawlers that do not run JavaScript, which includes most AI crawlers, see only a placeholder. Our JavaScript SEO guide explains why.
The lazy-loading checker lists which images on a page are lazy-loaded and flags any in the first screen.
7. The LCP Image and fetchpriority
On most pages the Largest Contentful Paint element is an image: a hero banner, a product photo or a featured image. Speeding up that one image often does more for LCP than everything else combined. Make sure it is:
- In the initial HTML as an
<img>, so the browser finds it immediately. A CSS background image or an image inserted by JavaScript is discovered late. - Not lazy-loaded.
- Marked as high priority with
fetchpriority="high", which tells the browser to download it ahead of other images. - Right-sized and compressed, with
srcsetfor smaller screens. - Served from your own domain or a fast CDN, avoiding an extra connection to a slow third-party host.
<img src="/images/hero-1200.avif"
srcset="/images/hero-600.avif 600w, /images/hero-1200.avif 1200w, /images/hero-1800.avif 1800w"
sizes="100vw"
alt="Runner on a mountain trail at sunrise"
width="1800" height="900"
fetchpriority="high">
If the LCP image really must be a CSS background, preload it so the browser starts the download early:
<link rel="preload" as="image" href="/images/hero-1200.avif"
imagesrcset="/images/hero-600.avif 600w, /images/hero-1200.avif 1200w"
imagesizes="100vw" fetchpriority="high">
Use fetchpriority="high" on one or two images at most. Marking everything as high priority means nothing is. Check the result with the Core Web Vitals checker or the page speed test, and see the page speed guide for the server-side fixes that also affect LCP.
8. Make Images Discoverable
Google can only index images it can find and fetch:
- Use HTML image elements. Google's documentation says it does not index images referenced only in CSS, such as
background-image. If an image matters for search, put it in an<img>or<picture>element. - Do not block image folders in robots.txt. A
Disallow: /wp-content/uploads/or a blanket rule on your CDN hostname hides every image. If your images live on a CDN subdomain, that host's robots.txt applies too. - Keep important images on indexable pages. An image on a
noindexpage can still be indexed in Google Images if Google finds it elsewhere, but its main context is lost.
Image sitemaps
For sites where images are a primary asset, such as stock libraries, recipe sites, product catalogues and portfolios, an image sitemap helps Google find images it might otherwise miss, for example those loaded by JavaScript. You can add image entries to your existing sitemap:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>https://example.com/products/oak-dining-table</loc>
<image:image>
<image:loc>https://cdn.example.com/images/oak-table-front.webp</image:loc>
</image:image>
<image:image>
<image:loc>https://cdn.example.com/images/oak-table-detail.webp</image:loc>
</image:image>
</url>
</urlset>
Google deprecated the image:caption, image:title, image:geo_location and image:license tags in 2022, so image:loc is the only image tag that still does anything. You can list up to 1,000 images per page entry. Images may be hosted on another domain, such as a CDN, as long as that domain allows crawling. The XML sitemap guide covers the rest of the sitemap format, and the sitemap validator checks that it parses.
9. Context: The Page Around the Image
Google's documentation says it extracts information about an image from the content of the page, including captions and the page title. An image on a page about the same subject, near relevant text, with a caption, is far easier to understand than the same image in a generic gallery.
- Place images near the text they illustrate.
- Use captions where they help readers. A
<figure>with<figcaption>ties the two together semantically. - Write a descriptive page title and headings. Google may use the page title in image result listings. Our meta tags guide covers titles.
- Use original images where you can. Your own product photos, screenshots and diagrams are more useful than the stock photo that appears on a thousand other sites, and they show first-hand experience, which our E-E-A-T guide discusses.
<figure>
<img src="/images/sole-wear-after-500km.webp"
alt="Close-up of a trail shoe sole showing even wear after 500 km"
width="1200" height="800" loading="lazy">
<figcaption>Sole wear after 500 km of mixed trail running.</figcaption>
</figure>
10. Structured Data and Images
Structured data does not rank images directly, but many rich results depend on it, and those results often display your images. The image property matters on:
- Product: product rich results and merchant listings show product images. See the ecommerce SEO guide and the product schema generator.
- Article: Google's documentation recommends providing several high-resolution images in different aspect ratios (16:9, 4:3 and 1:1) for article rich results and Discover. The article schema generator includes the field.
- Recipe, Event, Course and LocalBusiness also use images in their rich result displays.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How Trail Shoe Soles Wear Over 500 km",
"image": [
"https://example.com/images/sole-wear-16x9.webp",
"https://example.com/images/sole-wear-4x3.webp",
"https://example.com/images/sole-wear-1x1.webp"
],
"datePublished": "2026-10-20"
}
</script>
Images in structured data must be crawlable and indexable, and should show the actual content of the page. Validate the markup with the schema markup tester, and see our schema markup guide for complete examples.
11. Licensing Metadata and the "Licensable" Badge
If you license photos or illustrations, Google Images can show a "Licensable" badge and a link to your licensing terms. You can provide that information in either of two ways, per Google's image metadata documentation:
- Structured data using
ImageObjectwithlicense(a URL to your terms) andacquireLicensePage(where to buy or request a licence), plus optionalcreditText,creatorandcopyrightNotice. - IPTC photo metadata embedded in the image file itself, such as the Web Statement of Rights, Licensor URL, Creator and Copyright Notice fields.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "ImageObject",
"contentUrl": "https://example.com/photos/alpine-lake-dawn.jpg",
"license": "https://example.com/licensing",
"acquireLicensePage": "https://example.com/buy/alpine-lake-dawn",
"creditText": "Example Photography",
"creator": { "@type": "Person", "name": "Alex Rivera" },
"copyrightNotice": "Example Photography"
}
</script>
Be careful with image optimisation tools: many strip all metadata, including IPTC copyright fields, to save bytes. If you rely on embedded licensing data, configure your pipeline to keep those fields. Google also reads IPTC's "digital source type" field, which can mark an image as created or edited with AI; tools such as Google's own image generation features add it automatically.
Images and AI Search
AI assistants are increasingly multimodal, and Google Lens and AI Mode let people search with a photo. Most of the work is the same as for classic image SEO: descriptive alt text, clear context, captions, and images in plain HTML. Two extra points:
- Many AI crawlers do not run JavaScript, so images (and their alt text) inserted by scripts are invisible to them. Keep image markup in the server HTML.
- Information locked inside an image, such as a pricing table saved as a PNG, is hard for any system to quote reliably. Put facts in HTML text and use images to illustrate them. The AEO guide covers making content easy to extract and cite.
Platform Notes
WordPress
- Set alt text in the Media Library or the image block. The alt field in the library is reused when you insert the image, but you can change it per use.
- WordPress adds
loading="lazy"automatically and, since version 6.3, tries to skip lazy loading and addfetchpriority="high"for the image it judges most likely to be the LCP element. Check that it picked the right one, especially with page builders. - WordPress supports uploading WebP, and AVIF since version 6.5, provided the server's image library supports it. Optimisation plugins can convert existing images.
Shopify
- Add alt text to product media in the product editor; many themes reuse it on collection pages.
- Shopify's CDN serves modern formats automatically to browsers that support them, and the
image_urlandimage_tagLiquid filters generate resized versions. - Check your theme's hero section: many themes lazy-load every image, including the first slide of a slideshow. The lazy-loading checker catches this quickly.
Auditing Images Across a Site
- Run key templates (homepage, category, product, article) through the image alt text checker and fix missing or vague alt text at the template level first, then in content.
- Give new uploads descriptive filenames going forward. Do not mass-rename old images that already rank without redirecting them.
- Find oversized images with the page speed test and set up automatic resizing and format conversion.
- Confirm the LCP image on each template is not lazy-loaded and uses
fetchpriority="high". - In Google Search Console, filter the Performance report by search type "Image" to see which pages earn image traffic. Our Google Search Console guide shows how.
- Run a full site audit to catch missing alt text and heavy images across every page, and keep the checks on the SEO checklist.
Frequently Asked Questions
Does alt text help SEO?
Yes. Google's documentation describes alt text as the most important attribute for image metadata, and it helps Google understand both the image and the page. Its first purpose is accessibility, though, and text written for people tends to be good for search as well.
Should every image have alt text?
Every image should have an alt attribute, but decorative images should have an empty one (alt="") so screen readers skip them. Meaningful images, such as product photos, charts, screenshots and linked images, need a real description.
Is WebP or AVIF better for SEO?
Google indexes both, so neither has a direct ranking advantage. AVIF usually produces smaller files, which helps page speed; WebP encodes faster and is very widely supported. Many sites serve AVIF with a WebP or JPEG fallback through <picture> or an image CDN.
Does lazy loading hurt SEO?
Native lazy loading (loading="lazy") does not stop Google indexing images. It hurts only when applied to images in the first screen, especially the LCP image, because it delays them, or when a JavaScript library hides the real image URL from crawlers.
Do I need an image sitemap?
Most sites do not. Google finds images through normal crawling of your pages. Image sitemaps help when images are central to your business, when they are loaded by JavaScript, or when you have very large catalogues. Only the image:loc tag is used now.
How do I get traffic from Google Images?
Use original, high-quality images on relevant pages; give them descriptive alt text, filenames and captions; make sure they are in HTML and crawlable; and add structured data for products, recipes or articles where it applies. Then track image search traffic in Search Console's Performance report with the "Image" search type.
Does image file size affect rankings?
Not directly, but large images slow pages down, and page experience, including Core Web Vitals, is part of how Google evaluates pages. Heavy images are also the most common cause of a slow Largest Contentful Paint, which visitors notice even when rankings do not change.