html

Add an image on Webpage AMP

If you want to add an image on your AMP webpage HTML you can use HTML element to add that.

<amp-img src="https://placeimg.com/640/480/any" alt="Image description here" width="640" height="480"></amp-img>

If you are creating your webpage using AMP then you can not add an image using the <img> tag. This will not validate the AMP page and if you are using <img> HTML element to render an image on the webpage.

To render an image on the AMP webpage you can use the <amp-img> tag and provide the URL of the image in the src property. The AMP will take care of lazy loading and fast rendering of the image on the webpage.

Was this helpful?