Problem/Motivation

I'm displaying AMP images with the fill layout option in order to help make them responsive (using this AMP documentation as a guide). When doing so, those images currently fail AMP validation because their width and height attributes are set to auto.

The provided patch fixes this issue by preventing images with the fill layout from having their width and height set to auto, retaining the original image dimensions instead. This allows the images to successfully pass AMP validation. I'd welcome additional feedback and testing on this, because my understanding is that amp-img elements with layout="fill" don't really need a width or height set at all, since the size of the relatively-positioned container surrounding the image is what determines the image size.

Thanks!

Comments

KurtTrowbridge created an issue.