Image SEO: File Names, Alt Text, Structured Data, and Google Image Search

Published May 2026 · Updated May 29, 2026

Why image SEO matters

Search engines cannot see images the way humans do. They read the text signals around an image — the file name, alt attribute, surrounding paragraph text, structured data, and page context — to understand what the image depicts and whether it is relevant to a given search query.

Getting this right matters for two distinct reasons. First, images with good SEO signals rank in Google Image Search, which drives a meaningful share of referral traffic for sites with visual content. Second, search engines use image relevance as one input when assessing overall page quality — a page where images are properly labeled and relevant to the content signals to crawlers that the page was carefully prepared.

The good news is that image SEO is mostly a checklist of straightforward practices: file naming conventions, writing accurate alt text, picking the right format and file size, and in some cases adding structured data. None of it requires advanced technical knowledge.

Image file names

The file name is one of the first signals a search engine uses to understand an image. Crawlers read the URL path — and a path like /images/IMG_4821.jpg tells them nothing, while /images/apple-watch-ultra-black-titanium.jpg tells them quite a lot.

Naming conventions that work

✗ Poor file names
IMG_4821.jpg · photo1.png · image-file-2.webp · DSC00412-copy.jpg
✓ Better file names
homemade-sourdough-bread.jpg · nike-air-max-90-white.webp · tokyo-skyline-night.jpg
Changing existing file names: If you rename image files that are already indexed, update all references on the page and add a redirect from the old URL if possible. A broken image URL is worse than a generic one.

Alt text

Alt text (the alt attribute on an <img> element) serves two purposes simultaneously: it describes the image to screen readers for visually impaired users, and it provides a primary text signal to search engine crawlers.

These two purposes are sometimes in tension — SEO alt text and accessibility alt text are not always written the same way — but they are mostly aligned. Good alt text for accessibility is usually good alt text for SEO.

How to write effective alt text

✗ Weak alt text
alt="product"
alt="image of shoes shoes buy shoes online best shoes"
alt="photo of a dog"
✓ Better alt text
alt="Nike Air Max 90 in white and black, right-side view"
alt="Golden retriever puppy sitting on a park bench"
alt="Bar chart showing monthly website traffic from Jan–Jun 2026"
AI alt text generation: Our AI Tools page can generate alt text automatically from an uploaded image using Cloudflare Workers AI. It is a useful starting point — review and edit the output before using it, but it captures the subject accurately in most cases.

Try an SEO-friendly alt text draft

Drop an image here to generate a concise alt text draft while you read the guide. Review the result before publishing it.

Drop an image here

or click to browse · JPG, PNG, WebP

Alt text for different image types

Image type Alt text approach Example
Product photo Brand + product name + key variant (color, size) Sony WH-1000XM5 headphones in midnight black
Photograph / scene Subject + action or context + location if relevant Aerial view of Santorini cliffs at sunset
Chart or graph Type of chart + what it shows + key conclusion Line chart showing 40% revenue growth Q1–Q4 2025
Screenshot What the screenshot is of + the key UI element shown Chrome DevTools Network panel showing image load times
Decorative / spacer Empty alt (alt="") alt=""

Image dimensions and file size

Image SEO is not only about text signals — technical factors affect how images rank and how the page performs overall.

Serve images at display size

One of the most common SEO and performance mistakes is serving images at much larger dimensions than they are displayed. A 4000×3000 JPEG served in a 600px-wide blog column is sending three times more data to the browser than needed. Google's crawlers and Lighthouse checks flag this as wasted bandwidth, which directly affects your Page Speed score and LCP (Largest Contentful Paint).

The correct approach is to resize images to roughly 1× or 2× their display dimensions (for high-DPI screens), then use srcset to serve different sizes to different devices. For a 600px column on desktop and 100vw on mobile, you might serve a 600px, 900px, and 1200px version and let the browser pick the right one.

File size and LCP

LCP is the render time of the largest visible element in the viewport — and it is almost always an image (hero image, featured photo, product shot). LCP is a Core Web Vitals metric and a confirmed Google ranking signal.

The practical targets for LCP images:

If your hero image is 800KB+, LCP will almost certainly be above 2.5 seconds — the threshold Google considers "good". Compress and convert the image before worrying about any other SEO factor.

Quick wins: Convert JPEG hero images to WebP with our format converter, then run them through the image compressor. Most hero images can be brought under 100KB without any visible quality loss.

Structured data for images

Structured data (schema.org markup in JSON-LD format) gives search engines explicit, machine-readable information about an image and its context. While alt text and file names are inferred signals, structured data is a direct declaration.

ImageObject schema

The ImageObject type lets you declare properties of an image directly. It is most commonly used as part of a larger schema (like Article, Product, or Recipe) rather than standalone. For example, an article schema can include an image property pointing to the article's featured image:

{ "@type": "Article", "headline": "How to Make Sourdough Bread", "image": { "@type": "ImageObject", "url": "https://example.com/images/sourdough-loaf.jpg", "width": 1200, "height": 800, "caption": "A finished sourdough loaf on a wooden board" } }

Product images

E-commerce pages benefit the most from structured image data. Google's Shopping Graph — which powers product results in Search and Google Shopping — pulls product images from Product schema. High-quality, well-labeled product images with matching structured data are more likely to appear in visual product search results.

Key properties for product images: include at least one image URL in the image field of your Product schema. Google recommends images that are at least 160×90 px and no larger than 1920×1080 px, with the product clearly visible against a neutral background.

Recipe and how-to images

Recipe and how-to pages that include structured data with images are eligible for Google's rich results — the visual cards that appear at the top of search results. Each step in a HowTo schema can include its own image, and recipe schemas can include multiple images for different preparation stages. These rich results can dramatically increase click-through rates compared to plain text listings.

Open Graph and social sharing images

When a page is shared on social media (Twitter/X, Facebook, LinkedIn, Slack, iMessage), platforms pull the preview image from the page's Open Graph meta tags. This is separate from search engine indexing but affects click-through rates when links are shared.

<meta property="og:image" content="https://example.com/og/article-share.jpg"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="630"> <meta name="twitter:card" content="summary_large_image"> <meta name="twitter:image" content="https://example.com/og/article-share.jpg">

The standard recommendation is 1200×630 px for Open Graph images — this renders well across most platforms without cropping. Use a JPEG or WebP at 80–85% quality; most platforms cache these aggressively so file size is less critical than for page images.

Use a dedicated share image rather than a content image. Share images look best when designed with a title overlay and enough margin around the edges so platform cropping does not cut off important content.

Image sitemaps

A standard XML sitemap tells Google which pages exist. An image sitemap (using the image: namespace extension) tells Google which images are on each page, along with their metadata. This helps Google discover images faster — particularly on pages with images loaded via JavaScript, which crawlers handle less reliably.

<url> <loc>https://example.com/products/sourdough-starter</loc> <image:image> <image:loc>https://example.com/img/sourdough-starter-100g.jpg</image:loc> <image:title>Sourdough starter 100g jar</image:title> <image:caption>Active sourdough starter in a glass jar with lid</image:caption> </image:image> </url>

Image sitemaps are most valuable for: e-commerce product pages, photo galleries, and any page where images are a primary content type. For a standard blog with a few images per post, the incremental crawl discovery benefit is small.

Google Image Search ranking factors

Google Image Search is a separate ranking surface from web search. Understanding how it works helps prioritize image SEO efforts.

What Google uses to rank images

Practical priorities for image search traffic

If Google Image Search is a traffic goal, focus on:

Image SEO checklist

A practical reference for auditing or building image SEO on any page:

Factor What to check Priority
File name Descriptive, hyphenated, no camera auto-names High
Alt text Present, accurate, under 125 chars, no stuffing High
File size Hero images <100KB, secondary images <50KB High
Format WebP or AVIF for photographs; PNG for graphics with transparency High
Display dimensions Served at 1×–2× display size, not 5× High
Structured data Product/Article/Recipe schema includes image property Medium
Open Graph image og:image at 1200×630, relevant to page content Medium
LCP image preload <link rel="preload" as="image"> for above-fold hero Medium
Image sitemap Add image namespace for e-commerce / gallery pages Low–Medium
Lazy loading loading="lazy" on below-fold images, not on LCP image Medium
CDN / caching Images served with long cache TTL and from edge location Medium

Frequently asked questions

Does image alt text directly affect page ranking (not just image search)?

Yes, indirectly. Alt text is part of the page's overall text content. It contributes to topical relevance signals that search engines use to understand what a page is about. A product page where every image has relevant, descriptive alt text reinforces the topical focus of the page. Keyword-stuffed or missing alt text does not directly penalize rankings, but it is a missed opportunity and can raise accessibility flags in audits.

Does switching from JPEG to WebP affect image search rankings?

Switching formats does not directly affect image search rankings — Google's crawlers handle WebP, AVIF, PNG, and JPEG equally well. The indirect benefit is that WebP images are smaller, which improves page load time and LCP, both of which are ranking signals. If you change the image URL when converting (e.g., from image.jpg to image.webp), make sure to update all references on the page and consider whether the old URL needs a redirect if it was already indexed.

How long does it take for images to appear in Google Image Search?

Typically days to a few weeks for new sites, and hours to days for established domains that Googlebot crawls frequently. Submitting a sitemap via Google Search Console and requesting indexing of the page containing the image speeds this up. Using an image sitemap with the image: namespace extension ensures Googlebot can find all images on the page — particularly useful if images are loaded via JavaScript.

Is the title attribute on images useful for SEO?

The title attribute appears as a browser tooltip on hover and is occasionally used by some search engines, but it is not a significant SEO factor and should not be prioritized over alt text. Avoid duplicating your alt text in the title attribute — if they are identical, it adds no new information. Use title only when it provides genuinely additional context that cannot fit in the alt text, such as a longer caption or attribution.

Should I compress images that are already indexed in Google Image Search?

Yes, if the quality reduction is minimal. Google prefers images with sufficient resolution — heavily over-compressed images with visible artifacts rank lower in image search because they provide a poor user experience. Aim for the highest quality at the smallest file size: WebP at quality 80–85 typically achieves this. Do not change the URL unless absolutely necessary — keeping the same URL means Google's index entry stays valid without requiring re-crawl.

Related guides

🗜️
Image Compression Explained
Lossy vs. lossless, quality settings, file size targets
🖼️
JPG, PNG, WebP, AVIF: Which Format?
Choosing the right image format for every use case
Images and Core Web Vitals
srcset, lazy loading, preloading, and LCP optimization

Tools used in this guide