Opens in a new tab

ImageGallery schema and image sitemap

Each gallery can describe itself to search engines. The plugin prints one ImageGallery JSON-LD block in the page footer and lists the gallery images in an image sitemap. Both are on by default and can be switched off per gallery with Output ImageGallery schema.

Schema on

This gallery outputs ImageGallery schema and its images are in the sitemap.

Schema off

This gallery has Output ImageGallery schema switched off. It adds nothing to the JSON-LD and its photos are not in the sitemap.

The JSON-LD

Only the Schema on gallery appears below. It joins the page graph by pointing at the page webpage id, so it sits alongside the graph from Rank Math or Yoast instead of duplicating it. Each photo lists its URL, size, name and alt text. View the page source and search for beg-schema to see the full block.

{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "ImageGallery",
            "@id": "https://bricks-playground.co.uk/galleries-schema-sitemap/#beg-schema-on",
            "name": "schema-on",
            "url": "https://bricks-playground.co.uk/galleries-schema-sitemap/",
            "isPartOf": {
                "@id": "https://bricks-playground.co.uk/galleries-schema-sitemap/#webpage"
            },
            "image": [
                {
                    "@type": "ImageObject",
                    "contentUrl": "https://bricks-playground.co.uk/wp-content/uploads/2026/10/A-kite-banks-in-flight-above-the-areas-used-for-the-NaturesLens-Eagles-other-birdlife-of-Northern-Spain-photography-holiday-1536x1025-1.jpg",
                    "width": 1536,
                    "height": 1025,
                    "name": "A kite banks in flight",
                    "description": "A kite banks in flight"
                },
                {
                    "@type": "ImageObject",
                    "contentUrl": "https://bricks-playground.co.uk/wp-content/uploads/2026/10/A-Golden-Eagle-strikes-a-pose-captured-at-one-of-the-locations-used-for-the-Natureslens-Eagles-Other-Birdlife-Of-Northern-Spain-Photography-Holiday-1536x1024-1.jpg",
                    "width": 1536,
                    "height": 1024,
                    "name": "A Golden Eagle strikes a pose",
                    "description": "A Golden Eagle strikes a pose"
                }
            ],
            "__note": "image list shortened here for the demo, the real block lists every photo"
        }
    ]
}

The image sitemap

Without Rank Math or Yoast the plugin serves its own sitemap at /beg-image-sitemap.xml and adds it to robots.txt. With either of them installed it adds the gallery images to each page existing sitemap entry instead. Only the first entry for this page is shown, shortened.

<url><loc>https://bricks-playground.co.uk/galleries-schema-sitemap/</loc>
  <image:image><image:loc>https://bricks-playground.co.uk/wp-content/uploads/2026/10/A-kite-banks-in-flight-above-the-areas-used-for-the-NaturesLens-Eagles-other-birdlife-of-Northern-Spain-photography-holiday-1536x1025-1.jpg</image:loc><image:title>A kite banks in flight</image:title></image:image>
  <image:image><image:loc>https://bricks-playground.co.uk/wp-content/uploads/2026/10/A-Golden-Eagle-strikes-a-pose-captured-at-one-of-the-locations-used-for-the-Natureslens-Eagles-Other-Birdlife-Of-Northern-Spain-Photography-Holiday-1536x1024-1.jpg</image:loc><image:title>A Golden Eagle strikes a pose</image:title></image:image>
  <image:image><image:loc>https://bricks-playground.co.uk/wp-content/uploads/2026/10/A-fox-pup-visits-one-of-the-hide-locations-captured-at-one-of-the-locations-used-for-the-Natureslens-Eagles-Other-Birdlife-Of-Northern-Spain-Photography-Holiday-1536x1025-1.jpg</image:loc><image:title>A fox pup visits a hide</image:title></image:image>
  ...
</url>

The Schema off photos (egret and the two after it) are not in the entry.