Mobile app version of vmapp.org
Login or Join
Miguel251

: "image" property inside Article with or without ImageObject? Can I use itemprop image directly?: <article itemscope itemtype="http://schema.org/Article"> <img itemprop="image" src="1.png"> <h1

@Miguel251

Posted in: #Google #Microdata #SchemaOrg

Can I use itemprop image directly?:

<article itemscope itemtype="http://schema.org/Article">
<img itemprop="image" src="1.png">
<h1 itemprop="headline name" >Title of the post</h1>
<div>2016-01-07</div>
<p itemprop="articleBody">This is the body of the post</p>
</article>


Or should I embed inside ImageObject?

<article itemscope itemtype="http://schema.org/Article">
<div itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
<img itemprop="contentUrl url" src="1.png" alt="alt of the image">
</div>
<h1 itemprop="headline name" >Title of the post</h1>
<div>2016-01-07</div>
<p itemprop="articleBody">This is the body of the post</p>
</article>


When I use the Google tool (www.google.com/webmasters/markup-helper/) it gives me the first option.

But then the testing tool gives me an error:


The attribute image.itemtype has an invalid value

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Miguel251

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

From the perspective of Schema.org, both ways are fine, as the image property expects an ImageObject value (your second example) or a URL value (your first example).

As always, a specific consumer might support only one of these two ways.

For many of Google’s rich results, an ImageObject is required, because Google wants to see more data about the image, which is not possible when providing just a URL. For example, their Articles rich result requires the height/width properties for the ImageObject value.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme