Search code examples
htmlfrontendamp-htmlmagento-2.3google-search-console

Google Search Console shows "Disallowed attribute or attribute value present in HTML tag " for <amp-img layout="fixed"


I don't understand why the layout="fixed" is an disallowed attribute value. Could anyone please help find a solution to this error being shown for several pages across our Magento store?

<amp-img layout="fixed" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazy lazy-loading lazy-blur p1only" name="NewportHotHero" data-src="/images/5b22c63cd95b2.jpg" width="1500" id="NewportHotHero" height="1"></amp-img></a>

The actual content for this category in the Magento Admin is as follows:

<p><a href="#products"><img id="NewportHotHero" class="p1only" style="display: none;" src="/images/5b22c63cd95b2.jpg" width="1500" name="NewportHotHero" border="0" /></a> <a name="pro_d"></a></p>

Solution

  • Your all attribute looks right, except name="NewportHotHero".

    The

    "name"

    attribute is not documented in documentation.

    Or you can play your code posted here and see the error.