1

在 Blogger 中,我正在支持我的网站放大器,为此,在我的帖子中,我更改了所有<img to <amp-img. 但在结构化数据中,我使用以下代码:

<div class='none' itemprop='image' itemscope='itemscope' itemtype='https://schema.org/ImageObject'>
      <b:if cond='data:post.firstImageUrl'>
        <amp-img expr:src='data:post.firstImageUrl' itemprop='image'/>
        <meta expr:content='data:post.firstImageUrl' itemprop='url'/>
      </b:if>
      <meta content='800' itemprop='width'/> <!--Images should be at least 696 pixels wide.-->
      <meta content='800' itemprop='height'/>
    </div>   
每当我在结构化数据测试工具中检查此工具时。以上代码无法提取<amp-imgURL,因为它仅用于提取<imgURL。我怎样才能解决这个问题?

4

1 回答 1

2

在许多论坛上搜索了很多之后,我找到了我的问题的这个解决方案。在 Post Use <amp-imgwith NoScript from amp guideline中。

<amp-img src="images/sunset.jpg"
  width="264"
  height="195">
  <noscript>
    <img src="images/sunset.jpg" width="264" height="195" />
  </noscript>
</amp-img>

这可以是您图像的两个版本,一个是放大器,另一个是非放大器。

于 2017-08-01T05:49:18.417 回答