Invalid value for attribute in layout ‘width’ in tag ‘amp-img’
-
Dear support,
Today, I’ve had a number of pages with this error in my google search console.
Quoting google:
Google systems have detected that some of your AMP pages do not meet our guidelines; therefore these pages are not eligible for AMP-related features in Google Search. The Accelerated Mobile Pages report lists some of these pages.
In other words, this is costing me search engine traffic.
It’s a very easy fix for you guys. I’ve told you about this issue before and I figured it would be fixed by now. There simply needs to be a numerical value in the height and width attributes of an image tag.
If no image can be found, you can’t determine its dimensions. If no dimensions can be determined, your plugin puts empty height/width attributes in there.
See screenshot, whichs shows an Amazon affiliate link that has become unavailable, so now your plugin is rendering empty width/height tags.
Google’s guidelines are that all images must have widths specified:
https://support.google.com/webmasters/answer/114016?hl=en
Specify a width and height for all images. A web browser can begin to render a page even before images are downloaded, provided that it knows the dimensions to wrap non-replaceable elements around. Specifying these dimensions can speed up page loading and improve the user experience.
Can you please modify your plugin to show 0 for width/height in case no dimensions could be determined for a dead image link?
Sincerely,
Jay
- The topic ‘Invalid value for attribute in layout ‘width’ in tag ‘amp-img’’ is closed to new replies.