AMP文章微数据中的SVG图像?

4
当尝试使用Google的结构化数据测试工具验证schema.org/Article时,如果指定了SVG图像,则会出现错误:

logo提供的值必须是有效的URL。

由以下内容要求:

AMP文章(这是什么?)

当将URL更改为具有.png(或.jpg.bmp.webp等)扩展名而不是.svg时,它通过了验证。
这是我正在使用的示例:
<div itemscope itemtype="http://schema.org/Article">
    <div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
        <meta itemprop="name" content="Example" />
        <meta itemprop="url" content="http://example.com" />
        <div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
            <meta itemprop="url" content="http://example.com/logo.svg" />
            <meta itemprop="width" content="600" />
            <meta itemprop="height" content="60" />
        </div>
    </div>
    <meta itemprop="dateModified" content="2016-01-05T12:43" />
    <meta itemprop="datePublished" content="2016-01-05T12:43" />
    <meta itemprop="headline" content="Example" />
    <meta itemprop="name" content="Example" />
    <meta itemprop="author" content="Example" />
    <link itemprop="mainEntityOfPage" href="http://example.com/article" />
    <div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
        <meta itemprop="url" content="http://example.com/article.jpg" />
        <meta itemprop="width" content="1200" />
        <meta itemprop="height" content="800" />
    </div>
</div>

更改其他图像的URL扩展名也会产生错误。
我无法在Rich Snippets documentationAMP HTML spec中找到关于为什么拒绝SVG的任何信息。有人能解释一下这种行为吗?

2
只是为了明确:这不是 AMP 所必需的。这只是谷歌(可能)要求为了显示他们的搜索结果功能。使用 Schema.org 提供 SVG 图像是完全可以的。 - unor
3个回答

8
谷歌已更新结构化数据中关于走马灯顶部新闻的文档,并特别提到了svg。
徽标图像文件应为栅格图像(例如.jpg、.png、.gif格式),不应为矢量图像(例如.svg格式),且不得含动画。

3

好的发现!我猜我们只需要假设那些规则也适用于标志。奇怪。 - doingweb

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接