Create an image sitemap

Contributors

@brandon-leuangpaseuth @paul-boag


Business Benefits

Make it easier for people to find images on your website from a search engine.


Create a spreadsheet of all pages and posts on your website with images that you want people to find via search engines.

  • Have one column for Page URL and one for Image URL.
  • Do not include URLs that are blocked by robots.txt file or are password-protected.

Paste in the URL of each image in the column beside its page or post URL.

You might need several rows for each page or post if you have multiple images per page.

Open a text file editor like Notepad on your computer and start a new file.

Code all your post, page, and image URLs in XML tags, with the image URLs listed within the tags for the page or post they are displayed on.

Your XML code should have the following format:

https://example.com/page1.html

      https://example.com/image1.png


      https://example.com/image2.png
```- Start with a <url> tag for each page.
- Add the page URL within <loc> tags. For example, `https://example.com/page1.html`.
- For each image, add `` tags enclosing the image URL within `` tags. For example, `https://example.com/image1.png`.
- You can only have up to 1,000 `` tags in a `` tag.
- For photography websites and similar, you can add image license URL and geolocation with `` and `` tags respectively.


## Save the file as `image_sitemap.xml`.

Each sitemap should not have more than 50,000 URLs or exceed 50 MB. If your index file exceeds one of those restrictions, create more than one sitemap, then link to all your image sitemap files in a general sitemap index file called `sitemap_index.xml` which links to all the sitemaps on your website like this:




		https://example.com/-sitemap1.xml


		https://example.com/image-sitemap1.xml



## Update your sitemap when you publish new images that you want search engine crawlers to index.


## Alternatively, download the [Screaming Frog SEO Spider](https://www.screamingfrog.co.uk/seo-spider/), install it on your computer, and run a crawl of your website.

1. Click on ***Sitemaps*** to generate an image XML sitemap.
2. Uncheck all the checkboxes in the other tabs, click ***Next*** and save the sitemap as `image_sitemap.xml` on your computer.

![](https://lh5.googleusercontent.com/1WI2n-rIcTfmzNk4AmxGjgmVzTFgs6WcI3cxdU-O_0DTH378McBsOI6Ujr8mHosSqIfvMr6b6CdIa8kUfHxT10PORe1wFWvi327uTL8Wt7oZIJsK-mY7eQdWFqDfVFCcSTDym1IX)

Last edited by @hesh_fekry 2023-11-14T16:25:18Z