Invalid value for attribute in layout ‘width’ in tag ‘amp-img’
-
Google Search Console is showing me this error every once in a while. The problem is in this little snippet of code:
<amp-img src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=B00IOWOPD4&Format=_SL350_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1" width="" height="" sizes="(min-width: 0px) 0px, 100vw" class="amp-wp-enforced-sizes"></amp-img></div>
IT’s am Amazon Associate image link. The product with ASIN code B00IOWOPD4 has disappeared and an image can no longer be loaded.
This causes the width and the height parameters to become empty. This is not a valid value and causes Search Console to complain about it.
It’s understandable that no dimensions could be determined for a non existing image. However, the default values should be 0, rather than empty string.
Can this be fixed?
- The topic ‘Invalid value for attribute in layout ‘width’ in tag ‘amp-img’’ is closed to new replies.