htmlsharebloggeramp-htmlamp-img

Use the first amp-img on the page for facebook share


I have a blogger website that I have recently migrated to amp-html.

I am having problems with the usage of amp-img tag. Firstly blogger does not recognize the First amp-img as the first image of the post and fails to make the default thumbnail out of it.

Also when sharing a page on facebook using amp-share, the selected image is invariably the fallback image, that I have tagged with og:image property.

The image resolution is more than the minimum mandated by facebook. I have seen this arrangement working fine on other websites. Can someone please have a quick look here: Pratyush.info


Solution

  • A few days after posting this question I discovered that adding a noscript makes the image identifiable by blogger and can be used with data tags. So till google adds some inbuilt support for amp tags, may be this could be what someone is looking for.

    <noscript><img alt="www.pratyush.info" height="382" src="https://lh3.googleusercontent.com/--vp_bO1ozGI/WPegTDKQJDI/AAAAAAAADnQ/FXdCyVKJkTwEj09XneY7csB2Vwd_zVQrQCLcB/milk-protein-intolerance-baby-cow-2160x1200.jpg" title="www.pratyush.info" width="680"></noscript>
    

    DEMO