Animated GIFs included via `<amp-img>` and `<amp-anim>` should be reencoded as videos as an AMP Cache optimization
See original GitHub issueAnimated GIFs can get huge. It would be great if the AMP Cache reencoded huge (ToDo: determine the threshold) animated GIFs included via <amp-img>
and <amp-anim>
into videos. Safari Technology preview now also accepts video as the source of an image, which might help (background article).
Related Issue: https://github.com/ampproject/amphtml/issues/30
Update: replaced “modern browsers” with “Safari Technology Preview”.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Replacing Animated GIFs with Videos for Faster Page Speed
Replacing GIFs with HTML5 video is a quick and easy way to speed up your site. Learn how to convert GIFS and use...
Read more >Overview | Google AMP Cache
The Google AMP Cache serves cached copies of valid AMP content published to the web. Serve content directly from the Google AMP Cache...
Read more >Google AMP amp-anim - GeeksforGeeks
It helps the developer to embed animations, gif, webp, etc in your web platform. It is really a very useful tag as having...
Read more >Optimize your hosted AMP pages - amp.dev
The AMP runtime is optimized for speed and if your AMP pages are served by an AMP cache, they are fully optimized and...
Read more >Google's AMP 101: What You Should Know (and How to Get ...
Although Google's AMP cache delivers most AMP pages, ... are animated GIFs, you must also use the additional amp-anim extended component.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
One issue to keep in mind is that iOS has hardware limit (anywhere between 4-16) on number of videos it can autoplay (this is due to decoding on hardware) So a GIF heavy page can quickly run into autoplay not working. There are workarounds for this but we don’t have them in AMP yet (we do have them in AMP Story through complicated use of a MediaPool)
@tomayac “Modern browsers” might be a bit overstatement - it’s implemented only in Safari and not even sure if it got out of Technology Preview branch.