Schema.org NewsArticle: invalid value for logo property

这一生的挚爱 提交于 2019-11-27 16:14:00
unor

Your markup is valid HTML5+Microdata and you are using the Schema.org vocabulary appropriately.

With "validator", you probably refer to Google’s Structured Data Testing Tool. Note that errors shown in this tool don’t necessarily mean that your markup is wrong; they often mean that you won’t get a certain Google search result feature unless you provide certain properties.

If you want to get this search result feature in Google Search (e.g., the Article Rich Snippet), you have to provide an ImageObject item as value (instead of a URL value) for the logo property.

<div itemscope itemprop="publisher" itemtype="http://schema.org/Organization">

  <div itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
    <img itemprop="url" src="https://www.mysite.de/resources/assets/71/small/my_logo_web.png" />
    <!-- and Google probably requires some more properties here, e.g. "height" and "width" -->
  </div>

  <span itemprop="name">My Company</span>

</div>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!