0

I am looking to add Image structured schema data to many pages, each page displays a grid of 15-20 images. Is it possible to define the structured data as follows (with only the @context and @type)? Or is it necessary to add more information, like a node identifier. I have read about blank nodes and think it may be an appropriate way to distinguish each node.

Note: The pages for which I am adding structured data live on a CMS and each image/asset attribute is hard coded for each page (and there are 15 different languages locales). Ideally, one would add a URI (or equivalent) for each individual node. I'm looking for the easiest way to add this minimal structured data without needing to make any page-specific changes.

<div class="schema">
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@graph": [
      {"@type": "ImageObject"},
      {"@type": "ImageObject"},
      ...
      {"@type": "ImageObject"}
    ]
  }
  </script>
</div>

or

<div class="schema">
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@graph": [
      {"@type": "ImageObject", "@id": "_:img_0"},
      {"@type": "ImageObject", "@id": "_:img_1"},
      ...
      {"@type": "ImageObject", "@id": "_:img_n"}
    ]
  }
  </script>
</div>

Any thoughts or ideas is much appreciated.

  • Why are you adding this schema? It doesn't look like it is adding any data. You can tell from the HTML they are images, so you don't need schema to say that as well. – Stephen Ostermiller Mar 27 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.