Question

I've started to use schemas from schema.org in my HTML code and have prepared an image gallery (snippet below). When I pasted my code into Google Structured Data Testing Tool, I received no errors, thus I assumed my way use of these schemas was proper, but am still if it is. Is it?

<figure itemscope itemtype="http://schema.org/ImageGallery">
  <figcaption itemprop="description">The castle through the ages: 1423, 1858, and 1999 respectively.</figcaption>
  <figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
    <figcaption itemprop="caption">Etching. Anonymous, ca. 1423.</figcaption>
    <a href="castle1423.jpeg" itemprop="contentURL"> <img src="castle1423_thumb.jpeg" alt="The castle has one tower, and a tall wall around it." itemprop="thumbnailUrl"> </a> </figure>
  <figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
    <figcaption itemprop="caption">Oil-based paint on canvas. Maria Towle, 1858.</figcaption>
    <a href="castle185.jpeg" itemprop="contentURL"> <img src="castle1858_thumb.jpeg" alt="The castle now has two towers and two walls." itemprop="thumbnailUrl"> </a> </figure>
  <figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
    <figcaption itemprop="caption">Film photograph. Peter Jankle, 1999.</figcaption>
    <a href="castle1999.jpeg" itemprop="contentURL"> <img src="castle1999_thumb.jpeg" alt="The castle lies in ruins, the original tower all that remains in one piece." itemprop="thumbnailUrl"> </a> </figure>
</figure>
Was it helpful?

Solution

The image property of ImageGallery a) expects an URL, and b) is defined as:

URL of an image of the item.

So your markup says: "My ImageGallery can be described by three images."; while it probably should say: "My ImageGallery consists of three images.".

So with image you could specify an image that can be used to represent the whole gallery.

For each image of the gallery you should probably use the associatedMedia property (but I’m not 100% sure if I get its definition correctly, "encode" confuses me here).

The markup for each ImageObject looks good to me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top