Image and Video Sitemaps: What Google Requires
A normal XML sitemap lists the pages on your site. Image and video sitemaps do something different: they tell Google which images and videos appear on those pages. Used correctly, they help your media get found in Google Images and video results. Used incorrectly, Google quietly ignores them. This guide covers what image and video sitemaps must contain and the most common mistakes.
Why you can't just list image files in a sitemap
It's tempting to add every image URL to your sitemap as its own entry. Google's sitemap format doesn't work that way: each <loc> entry is meant to be a page. Image and video files listed as pages are ignored or reported as errors in Search Console.
Instead, media is listed inside the entry for the page that shows it, using Google's image and video extensions.
What an image sitemap contains
An image sitemap is a normal sitemap with an extra namespace. Each page entry lists the images that appear on that page:
<url>
<loc>https://example.com/guide.html</loc>
<image:image><image:loc>https://example.com/images/hero.webp</image:loc></image:image>
</url>
Rules for image sitemaps
- Up to 1,000 images per page entry.
- Only images that genuinely appear on the page. An image that no page uses may be accepted in the file, but Google only shows images in results once it finds them on a page.
- Images loaded without an <img> tag still count, such as a hero image loaded through a preload hint or listed as the page's og:image. A generator that only reads <img> tags can miss a page's main image entirely.
What a video sitemap requires
Video sitemaps are stricter. For every video, Google requires:
- A thumbnail URL, at least 160×90 pixels.
- A title for the video.
- A description, up to 2,048 characters.
- Either the video file's URL or a player URL, such as a YouTube embed.
Leave any of these out and that video entry is rejected. Two situations cause most problems:
Self-hosted videos without a poster
A <video> tag without a poster image has no thumbnail. A sensible fallback is the page's og:image, which Google accepts as long as it represents the video.
Video files that aren't on any page
A folder full of uploaded .mp4 or .MOV files doesn't belong in a video sitemap. Only videos that are actually embedded in a page qualify. And check each file really exists: a sitemap pointing to a missing video creates an error for every entry.
YouTube embeds in a video sitemap
YouTube videos embedded on your pages can be listed too. Use the embed address as the player URL, and YouTube's own thumbnail (https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg). The title and description can come from the page, as long as they describe the video.
Separate image and video sitemaps, or one sitemap?
You can put image and video entries into your main sitemap or keep them in separate files, such as sitemap-images.xml and sitemap-videos.xml. Separate files make problems easier to spot in Search Console, because each file shows its own counts and errors. List every sitemap in robots.txt on its own line:
Sitemap: https://example.com/sitemap.xml
Sitemap: https://example.com/sitemap-images.xml
Sitemap: https://example.com/sitemap-videos.xml
Make sure your robots.txt ends with a line break before adding new lines. Without it, a new Sitemap line can be glued onto the previous one, turning two valid addresses into one broken one.
After you submit them
Search Console often shows "Couldn't fetch" for a new sitemap before it has actually tried. If the sitemap loads in a browser and returns a 200 status with valid XML, give it a day, or remove and resubmit it.
Summary
List pages as entries, and images and videos inside the page that shows them. Images need only their URL; videos need a thumbnail, title, description and a file or player URL. Only include media that's really on a page and really exists. To check the pages behind your sitemaps, run a crawl with the combined site audit.
Frequently asked questions
Can I list image files as their own entries in a sitemap?
Image files should not be listed as their own entries in a sitemap. Google's sitemap format expects each loc entry to be a page, so image and video files listed as pages are ignored or reported as errors in Search Console. Instead, media is listed inside the entry for the page that displays it, using Google's image and video sitemap extensions. Each page entry can list up to 1,000 images, and only images that genuinely appear on that page should be included, because Google only shows images in results once it finds them on a page.
What fields does a video sitemap need for each video?
Video sitemaps are stricter than image sitemaps. For every video, Google requires a thumbnail URL of at least 160 by 90 pixels, a title, a description of up to 2,048 characters, and either the video file's URL or a player URL such as a YouTube embed. If any of these is missing, that video entry is rejected. Self-hosted videos without a poster image have no thumbnail, and a sensible fallback is the page's og:image if it represents the video. YouTube embeds can use the embed address as the player URL and YouTube's own thumbnail image.
Should image and video sitemaps be separate files?
Image and video entries can go into your main sitemap or into separate files such as sitemap-images.xml and sitemap-videos.xml. Separate files make problems easier to spot in Search Console, because each file shows its own counts and errors. Every sitemap should be listed in robots.txt on its own line. Make sure robots.txt ends with a line break before adding new lines, otherwise a new Sitemap line can be joined onto the previous one, turning two valid addresses into one broken one. A new sitemap may briefly show Couldn't fetch in Search Console before Google has actually tried it.