1

In Blogger, I am making my website amp supported and for this, in my post, I change all <img to <amp-img. But in structured data I Use following Code:

<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>   
Whenever I Check This Tool in Structured data testing Tool.Above code can't extract <amp-img URL because it was used to extract <img URL only. How can I Fix This?
Ajay Malik
  • 325
  • 4
  • 17

1 Answers1

2

After Searching a Lot On Many Forums I Found This Solution to My Question.In Post Use <amp-img with 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>

This can Two Version of your Image one is the amp and another is non-amp simultaneously.

Community
  • 1
  • 1
Ajay Malik
  • 325
  • 4
  • 17