Search code snippets, questions, articles... 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>
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

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

add gif file AMP
Was this helpful?
Join Devsheet Ask a Question