Chrome Extension

Embed animated files AMP

To add or embed animated files like gif or webp on your AMP page then you can use amp-anim component of AMP.
<!-- Load animation script in the head tag -->
<script async custom-element="amp-anim" src=""></script>

<!-- Use amp-anim where you want to show the animated file -->
<amp-anim width="500" height="350" src="/path/to/gif/or/webp/image.gif" alt="animation of file" attribution="">
  <amp-img placeholder width="500" height="350" src="/path/to/placeholder/image.png"></amp-img>
Code faster with devsheet chrome extension and increase productivity as a programmer
search code from your favorite search engine instantly.
Install Now

Search Index Data (The code snippet can also be found with below search text)

add gif file AMP
Was this helpful?
Open Code Manager We are hiring