Image Sitemap

Image Sitemap Generator

Help search engines discover and index all images on your website

Add URLs

No URLs Added

Add URLs using the form above to generate your sitemap.

Generated Sitemap

<!-- Add URLs to generate your sitemap -->

Other Sitemap Types

About Image Sitemap Generator

Images are a significant source of organic search traffic — Google Images drives billions of searches daily, and featured images in standard search results can dramatically increase click-through rates. Yet many websites leave image traffic on the table because their images aren't properly discoverable by search engine crawlers.

An image sitemap extends your standard XML sitemap with image-specific metadata, telling Google about images on each page that it might otherwise miss. This is especially important for images loaded via JavaScript, CSS backgrounds, lazy-loaded images, and images in iframes — content that Googlebot may not always crawl and index without explicit guidance from a sitemap.

Beyond simple discoverability, image sitemaps let you provide rich metadata about each image — captions, titles, geographic location, and licensing information. This metadata helps Google surface your images in the right search contexts and can contribute to better ranking in Google Images, where competition for visual search traffic is intensifying as more users discover content through visual search.

Why Images Need Their Own Sitemap

Standard XML sitemaps tell Google about your pages — but images embedded in those pages aren't always automatically discovered. Google's crawler has improved significantly at rendering JavaScript and finding lazy-loaded images, but it's not perfect. An image sitemap provides an explicit, reliable channel for communicating your image inventory to Google regardless of how those images are loaded.

The image sitemap uses a Google-specific XML extension (xmlns:image) added to your standard sitemap. Each URL entry can include multiple image tags, with metadata about each image including its URL, title, caption, license, and geographic location. This metadata feeds directly into Google Images' rich features and filtering capabilities.

Image sitemaps are particularly valuable for photography sites, e-commerce product catalogs, recipe sites, real estate listings, and any site where images are the primary content. For these sites, Google Image Search can be as important a traffic source as standard web search — making image sitemap optimization a first-priority SEO task rather than a nice-to-have.

Key Considerations

Image URL Requirements

Image URLs in sitemaps must be absolute URLs using HTTPS. The images must be publicly accessible — no authentication, no robots.txt blocking for Googlebot-Image. Images served from a different domain or CDN are supported, but Google must be able to verify ownership or access through your Search Console property.

Image Metadata Quality

The image:title and image:caption fields are indexed by Google and influence image search rankings. Write descriptive, keyword-relevant titles and captions that accurately describe the image content. Avoid keyword stuffing — Google's image quality algorithms penalize over-optimized metadata just as they do web content.

License Information

The image:license tag lets you specify a URL pointing to your image licensing terms. Google uses this information to power its Creative Commons and license filters in Google Images. If your images have specific usage rights, including license metadata helps the right users find your images and understand their usage terms.

Integration with Standard Sitemap

Image sitemaps don't need to be separate files — you can add image tags directly to your existing XML sitemap entries. Each URL entry in your sitemap can include up to 1,000 image tags. For sites with very large image inventories, a dedicated image sitemap file keeps things organized and easier to manage.

Common Image Sitemap Issues

Missing Images

  • Lazy-loaded images not included because they weren't in the initial HTML
  • CSS background images not included — these need explicit sitemap entries
  • JavaScript-rendered images missed by sitemap generators that don't execute JS
  • Images in iframes not captured by sitemap generation tools

Metadata Quality

  • Missing image:title and image:caption — losing valuable indexing signals
  • Generic filenames (img001.jpg) providing no semantic value to Google
  • Duplicate captions across multiple images reducing uniqueness signals
  • Missing alt text on image elements — complements but doesn't replace sitemap metadata

Technical Issues

  • Images blocked by robots.txt for Googlebot-Image specifically
  • Missing image namespace declaration in sitemap XML
  • Image URLs using HTTP when served over HTTPS
  • CDN image URLs not matching the domain verified in Google Search Console

Implementation Guide

Image Sitemap XML Structure

A properly formatted image sitemap with the Google image extension namespace:

<?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://www.example.com/tools/color-palette</loc>
    <lastmod>2026-02-28</lastmod>

    <!-- First image on this page -->
    <image:image>
      <image:loc>https://www.example.com/images/color-palette-preview.jpg</image:loc>
      <image:title>Color Palette Generator Tool Preview</image:title>
      <image:caption>Generate complementary, analogous, and triadic color palettes instantly</image:caption>
      <image:license>https://www.example.com/image-license</image:license>
    </image:image>

    <!-- Second image on this page -->
    <image:image>
      <image:loc>https://www.example.com/images/palette-examples.jpg</image:loc>
      <image:title>Color Palette Examples — Complementary and Triadic</image:title>
      <image:caption>Examples of complementary and triadic color palette combinations</image:caption>
    </image:image>

  </url>

</urlset>

Next.js Image Sitemap Generation

Generate an image sitemap dynamically in Next.js by extending your existing sitemap:

// app/sitemap.ts — Extended with image data
import { MetadataRoute } from "next";

// Define image data per page
const pageImages: Record<string, { loc: string; title: string; caption: string }[]> = {
  "/color-palette-generator": [
    {
      loc: "https://example.com/images/og/color-palette.jpg",
      title: "Color Palette Generator",
      caption: "Free online color palette generator for designers",
    },
  ],
  "/gradient-generator": [
    {
      loc: "https://example.com/images/og/gradient.jpg",
      title: "CSS Gradient Generator",
      caption: "Create linear, radial, and conic CSS gradients",
    },
  ],
};

// Note: Next.js MetadataRoute.Sitemap doesn't natively support
// image extensions. For full image sitemap support, generate
// a custom XML response:

// app/image-sitemap.xml/route.ts
export async function GET() {
  const pages = Object.entries(pageImages);

  const xml = `<?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">
${pages.map(([path, images]) => `  <url>
    <loc>https://example.com${path}</loc>
${images.map(img => `    <image:image>
      <image:loc>${img.loc}</image:loc>
      <image:title>${img.title}</image:title>
      <image:caption>${img.caption}</image:caption>
    </image:image>`).join("\n")}
  </url>`).join("\n")}
</urlset>`;

  return new Response(xml, {
    headers: { "Content-Type": "application/xml" },
  });
}

Allow Googlebot-Image in robots.txt

Ensure Google's image crawler can access your images:

# robots.txt — Allow image crawling
User-agent: *
Allow: /

# Explicitly allow Googlebot-Image
User-agent: Googlebot-Image
Allow: /images/
Allow: /uploads/
Allow: /static/

# If you use a CDN, also ensure CDN domain allows crawling
# Googlebot must be able to fetch images from cdn.example.com
# Add cdn.example.com as a property in Google Search Console

Common Use Cases

  • Photography and stock image sites maximizing Google Images traffic
  • E-commerce product catalogs with hundreds of product images
  • Recipe sites where food photography drives significant search traffic
  • Real estate sites where property photos are primary discovery content
  • Portfolio sites where image discoverability is central to the business

Pro Tip

Combine image sitemap optimization with proper alt text, descriptive filenames, and next/image optimization in Next.js. The sitemap tells Google about your images, but alt text and filenames tell Google what they contain. Both signals together produce significantly better Google Images rankings than either alone.

Frequently Asked Questions

Do I need an image sitemap if I use alt text on all my images?+
Alt text and image sitemaps serve different purposes and complement each other. Alt text helps Google understand image content when it crawls the page. Image sitemaps help Google discover images it might otherwise miss — particularly lazy-loaded images, JavaScript-rendered images, and CSS backgrounds. For maximum image search visibility, use both: alt text on all img elements and an image sitemap for comprehensive image metadata.
How many images can I include per URL in an image sitemap?+
Google supports up to 1,000 images per URL entry in your sitemap. However, including thousands of images per page in your sitemap can make the file very large. Prioritize including your most important images — hero images, product photos, featured content — rather than every decorative image. Low-quality or decorative images don't benefit from image sitemap inclusion.
Will an image sitemap help my images rank in Google Images?+
An image sitemap improves image discoverability and provides Google with rich metadata that influences ranking. However, the most important ranking factors for Google Images are the image itself (quality, relevance), the surrounding page content, alt text, and the page's overall authority. An image sitemap ensures your images are known to Google — it's a necessary but not sufficient condition for strong Google Images rankings.
Should I include all images or only specific ones?+
Include images that have independent search value — product photos, instructional images, original photography, infographics, and featured content images. Exclude decorative images (icons, dividers, background textures), images that are private or watermarked, and low-quality images you wouldn't want appearing in image search results. Quality over quantity applies to image sitemaps just as it does to web content.
Can I include images from a CDN in my image sitemap?+
Yes, you can include CDN-hosted image URLs in your image sitemap. The image URLs don't need to be on the same domain as your website. However, if your CDN is on a different domain (e.g., images.cdn.com), you should add that domain as a separate property in Google Search Console, or verify it as part of a domain property, so Google can confirm you have control over those image URLs.