Search code examples
amp-html

What is i-amp-sizer and why some amp-img's show below this sizer?


When I add amp-img, there is something like i-amp-sizer. My problem is, that i have some images that I want to get AMPed, and some of them didn't match this sizer (image shows precisely below the sizer).

Any ideas what can be the reason? I'd actually like to know what for is this amp-sizer responsible.


Solution

  • As stated on this documentation, any elements prefixed with i-amp- are considered to be internal to AMP and their use in user stylesheets is not allowed. They are shown here simply for informational purposes. You can check on this tutorial. You can see in the documentation above that the value of the CSS "display" is block and its size id based on parent container and aspect ratio of width:height.