Videos and Webinars
How do I Fix the "CONTAINER is not supported by tag amp-img" Error in AMP?

Resolving "CONTAINER is not supported by tag amp-img" Error

The following is a common error that appears when checking AMP on your product pages using Google's <href="" target="_blank">AMP Test tool.

Invalid layout property found in AMP tag
The implied layout 'CONTAINER' is not supported by tag 'amp-img'.

This error typically occurs when your description has images embedded in it, but the size of the images are not specified in the HTML coding.

For example, let's say the product's description contains an image in it that measures 100px by 100px. Perhaps it's a manufacturer's logo or some other image you've added in the description section of the product. The HTML for the image is written like this:

<img src="http://your-store-com/" />

Under normal circumstances, an image path like this will display fine. However, for AMP display, the image must be given an explicit size for its width and height. Therefore, the image path would need to be written with size attributes like this:

<img src="http://your-store-com/" width="100" height="100" />

So to fix this issue, edit your product's description so that the image(s) contained within it have their proper sizes/dimensions specified in the HTML. This way, the AMP process can correctly display the image.