Carter Steinhoff
Carter Steinhoff

Reputation: 41

How to add 'image' field to Review / MedicalClinic?

I have recently noticed that I am now getting an error in the Google Structured data testing tool for my Review and MedicalClinic Schema.org. I was not getting this error a week ago.

The issue present is that it's saying I don't have an image field, or a value for the image field. What is the syntax I would need to add to get the image field in the MedicalClinic and Review types?

<span itemscope itemtype="http://schema.org/MedicalClinic">
  <link itemprop="additionalType" href="http://www.productontology.org/id/Travel_medicine" />
  <span itemprop="name">Passport Health Baltimore Travel Clinic</span>
</span>

My page in the SDTT: https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fwww.passporthealthusa.com%2Flocations%2Fmd%2Fbaltimore%2F162%2F

Upvotes: 0

Views: 507

Answers (1)

unor
unor

Reputation: 96547

URL value

If you want to provide a URL value for Schema.org’s image property, you can use one of these elements in HTML+Microdata:

  • src attribute of the img element
  • href attribute of the a/area/link elements
  • data attribute of the object element

(per WHATWG’s HTML Microdata; omitting elements that don’t make sense for images)

So for example:

<link itemprop="image" href="image.png" />

ImageObject value

If you want to provide an ImageObject value (instead of a URL value), you can use any element that can have suitable child elements, e.g., a div:

<div itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
  <img itemprop="contentUrl" src="image.png" alt="" />
</div>

Upvotes: 2

Related Questions