首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Schema.org ImageObject url

Schema.org ImageObject url
EN

Webmasters Stack Exchange用户
提问于 2016-08-27 13:21:03
回答 1查看 1.6K关注 0票数 1

uses的ImageObject示例使用itemprop="contentUrl"

我在Google中测试了这个简化的代码:https://search.google.com/structured-data/testing-tool给了我一个错误:

url字段的值是必需的。

代码语言:javascript
复制
<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>

如何在Google中解决这个错误?

EN

回答 1

Webmasters Stack Exchange用户

回答已采纳

发布于 2016-08-27 15:52:50

除了url属性之外,还可以提供contentUrl属性:

代码语言:javascript
复制
<img itemprop="contentUrl url" src="1.png" alt="alt of the image">

(理想情况下,谷歌将使用/require contentUrl代替url作为其文章丰富成果的图像。)

票数 0
EN
页面原文内容由Webmasters Stack Exchange提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://webmasters.stackexchange.com/questions/98754

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档