1

Does somebody know, how this is supposed to be implemented correctly? In my local business full page, I have a carousel with several images, so what I did is that on the container of this carousel i have written the following: "itemprop='photos' itemscope itemtype="http://schema.org/ImageObject"", i.e.

<div class="tourism-product-media-gallery" itemprop='photos' itemscope itemtype="http://schema.org/ImageObject">

and then on each and every image i have written the following: "itemprop="contentURL"", i.e.

<img src="@mediaItem.NormalImage" alt="@mediaItemCaption" itemprop="contentURL"/>

But i am not convinced that this is the way it should be. Anyone has any insight on this and more knowledge?

Thanks

Note: here are the results from the rich snippet google testing tool:

click here

  • Reading this back you shouldn't need to use itemtype="http://schema.org/ImageObject" since it is a valid child of local business... so just use itemprop="photos" – Simon Hayter Nov 8 '13 at 19:19
  • Gonna edit my answer to clear some things up. – Simon Hayter Nov 8 '13 at 19:20
0

photos is a legacy spelling (you can read more about it at http://www.w3.org/wiki/WebSchemas/Singularity). You should now always use photo.

Only use the photo property if the images are photographs of your local business, of course.

While it might work to reference the image URLs directly, schema.org defines that the expected types of the photo property should be "ImageObject" or "Photograph".

So it could look like:

<div itemscope itemtype="http://schema.org/LocalBusiness">

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

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

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

</div>

(Not essential, but note that the spelling changed from contentURL to contentUrl.)

0

If the photos are relative to the business then you use itemprop="photos if you only have one image then you use itemprop="photo", now these should be relative to the business such as place so good images should be that of outside the building, instead the building and so on...

Looking at your code you shouldn't need to use the ImageObject since photo is a valid child of localbusiness, so just using itemprop="photos" is enough, see code below and a working example can be seen on Google that I made.

<html itemscope itemtype="http://schema.org/LocalBusiness">
<head><title>Pro Webmasters Rich Snippets Local Business Photo Test</title></head>
<body>    
    <div class="content">
        <h1><span itemprop="name">Company Name</span></h1>
        <img itemprop="photos" src="http://domain.com/image.jpg" alt="example">
    </div>
</body>
</html>

But this isn't to say that your current code is not valid since its being read as item 4, depends on the markup you want to use. Personally I'd avoid using extra unnecessary code but the choice is yours.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.