BlogPosting Publisher Logo 'logo.itemtype has an invalid value' on Google Structured Data Testing Tool
Turns out, because BlogPosting
is one of the types supported by Google as a possible Rich Snippet, they apply more validation:
Google Search Documentation Guidelines for Articles
This requires an Article's Publisher's logo
to be of type ImageObject
and have a width
and height
in pixels. BlogPosting
is a subtype of Article
.
This updated snippet validates through the Google Structured Data Testing Tool:
<div id='web-page-example' itemprop="mainEntityOfPage" itemscope itemtype="https://schema.org/WebPage" itemref="headline-example">
<div>
<div itemprop="publisher" itemscope id="organization-example" itemtype="https://schema.org/Organization">
<a itemprop="url" href="https://example.com">
<span itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<img itemprop="url" src="https://example.com/images/logo.png" alt="LOGO">
<meta itemprop="width" content="600">
<meta itemprop="height" content="60">
</span>
<span itemprop="name">EXAMPLE</span>
<span itemprop="description">This is an EXAMPLE</span>
</a>
</div>
</div>
<div
id="blog-posting-example"
itemprop="mainEntity"
itemscope
itemtype="https://schema.org/BlogPosting"
itemref="organization-example web-page-example"
>
<span itemprop="author" itemscope itemtype="https://schema.org/Person">
<span itemprop="name">Example Author</span>
</span>
<time itemprop="datePublished" datetime="2016-05-09T11:40:04+02:00">9th May 2016</time>
<time itemprop="dateModified" datetime="2016-05-09T11:40:04+02:00">9th May 2016</time>
<h1 id="headline-example" itemprop="name headline">Example Headline</h1>
<span itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<img itemprop="url" src="https://example.com/images/blog.png" alt="LOGO">
<meta itemprop="width" content="800">
<meta itemprop="height" content="400">
</span>
</div>
</div>
A brilliant and helpful answer by @Arth above.
To complement the answer above (not compete with it), here is the same Structured Data using the same schema.org vocabulary, but this time in JSON-LD
:
"publisher": {
"@type": "Organization",
"name": "myOrganization",
"logo": {
"@type": "ImageObject",
"name": "myOrganizationLogo",
"width": "60",
"height": "600",
"url": "http://my-organization.org/my-logo.png"
}
}
N.B. According to https://developers.google.com/search/docs/data-types/articles
The logo should be a rectangle, not a square.
The logo should fit in a
60x600px
rectangle., and either be exactly60px
high (preferred), or exactly600px
wide. (For example,450x45px
would not be acceptable, even though it fits in the600x60px
rectangle.)