XooCode(){

ImageGallery

ImageGallery is a direct CollectionPage subtype for pages whose primary content is a gallery of images. It has no unique properties; the pattern is mainEntity pointing to an ItemList of ImageObject entries.

Each ImageObject should carry contentUrl, name, caption (or description), license, and ideally creator and copyrightHolder.

Full example of schema.org/ImageGallery json-ld markup

The markup is verified as valid with Rich Results Test from Google.

schema.org/ImageGallery
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "ImageGallery",
  "name": "Xoo Code Quarterly — launch day photos",
  "url": "https://xoocode.com/events/quarterly-2026-q1/photos",
  "mainEntity": {
    "@type": "ItemList",
    "itemListElement": [
      { "@type": "ListItem", "position": 1, "item": { "@type": "ImageObject", "contentUrl": "https://xoocode.com/events/q1/01.jpg", "caption": "Doors open at The Thunderdome", "creator": { "@type": "Person", "name": "Priya Chen" } } },
      { "@type": "ListItem", "position": 2, "item": { "@type": "ImageObject", "contentUrl": "https://xoocode.com/events/q1/02.jpg", "caption": "Keynote: Typed SEO" } },
      { "@type": "ListItem", "position": 3, "item": { "@type": "ImageObject", "contentUrl": "https://xoocode.com/events/q1/03.jpg", "caption": "Hallway track" } }
    ]
  }
}
</script>

Minimal valid version

The smallest markup that still produces a valid ImageGallery entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.

schema.org/ImageGallery (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "ImageGallery",
  "name": "Launch day photos",
  "mainEntity": { "@type": "ItemList", "itemListElement": [{ "@type": "ListItem", "position": 1, "item": { "@type": "ImageObject", "contentUrl": "https://xoocode.com/events/q1/01.jpg" } }] }
}
</script>

Google rich results this unlocks

ImageGallery is a structural type. It does not produce a rich result on its own.

Its value comes from combining it with a primary type whose markup earns a rich result (Article, Product, Event, and so on). ImageGallery becomes the trunk that the primary type branches off viamainEntityorbreadcrumb. Include it on every page as the backbone of your markup.

Common ImageGallery mistakes

Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.

  1. 01

    ImageGallery with bare URLs

    Wrong
    Array of image URLs on mainEntity
    Right
    Typed ImageObject entries with name, caption, license

    Typed images carry the metadata that image-search and AI visual search actually consume.

Also mentioned in 1 other example

ImageGallery also appears in CollectionPage. See the full ImageGallery schema page for every reference.

About the example data

A gallery of launch-day photographs from the Xoo Code Quarterly event at The Thunderdome.

Comments

Loading comments...

Leave a comment