Warning that “image” and “logo” have wrong values

此生再无相见时 提交于 2019-12-11 04:04:09

问题


I've added Schema.org on my blog list with JSON-LD:

{
    "@context": "http://schema.org",
    "@type": "BlogPosting",
    "headline": "Fixer la navigation Off-Canvas sur Foundation",
    "image": "https://stephane-richin.s3-eu-central-1.amazonaws.com/S/foundation-website.jpg",
    "author": "Stéphane Richin",
    "datePublished": "2015-02-03",
    "dateModified": "2015-02-03",
    "publisher": {
        "@type": "Organization",
        "name": "Stéphane Richin",
        "url": "http://stephane-richin.fr",
        "logo" : "http://stephane-richin.fr/images/logo/logo-stephane-richin.svg"
    },
    "mainEntityOfPage": "True"
}

But, I've 2 warnings on image and logo:

image.itemtype has wrong value

logo.itemtype has wrong value

Do you have any idea why image and logo have wrong values?


回答1:


Looks like in order to pass the Structured Data Testing Tool you need to use ImageObject as a required property of image and publisher.logo.

From their documentation:

image - ImageObject, required

Your final code will look like:

{
    "@context":"http://schema.org",
    "@type":"BlogPosting",
    "headline":"Fixer la navigation Off-Canvas sur Foundation",
    "image": {
      "@type": "ImageObject",
      "url": "https://google.com/thumbnail1.jpg",
      "height": 800,
      "width": 800
    },
    "author": {
      "@type": "Person",
      "name": "Stéphane Richin"
    },
    "datePublished":"2015-02-03",
    "dateModified":"2015-02-03",
    "publisher": {
        "@type":"Organization",
        "name":"Stéphane Richin",
        "url":"http://stephane-richin.fr",
        "logo": {
          "@type": "ImageObject",
          "url": "https://google.com/logo.jpg",
          "width": 600,
          "height": 60
        }
    },
    "mainEntityOfPage": "True"
}

I also amended it to recognise the author as Person schema.



来源:https://stackoverflow.com/questions/40155971/warning-that-image-and-logo-have-wrong-values

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