Mobile app version of vmapp.org
Login or Join
Gail5422790

: Schema.org ImageObject url Schema.org’s ImageObject example uses itemprop="contentUrl". I tested this simplified code in Google: https://search.google.com/structured-data/testing-tool gives me an error:

@Gail5422790

Posted in: #Images #Microdata #SchemaOrg

Schema.org’s ImageObject example uses itemprop="contentUrl".

I tested this simplified code in Google: search.google.com/structured-data/testing-tool gives me an error:


A value for the url field is required


<div itemscope itemtype="http://schema.org/Article">
<div itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
<img itemprop="contentUrl" src="1.png" alt="alt of the image">
<p itemprop="caption">Caption of the image</p>
</div>
<h1 itemprop="name">Title of the post</h1>
<div itemprop="articleBody" class="text">
<p>This is the body of the post</p>
</div>
</div>


How to solve that error in Google?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Gail5422790

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

You can provide the url property in addition to the contentUrl property:

<img itemprop="contentUrl url" src="1.png" alt="alt of the image">


(Ideally Google would use/require contentUrl instead of url for the image for their Article rich result.)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme