question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Animated GIFs included via `<amp-img>` and `<amp-anim>` should be reencoded as videos as an AMP Cache optimization

See original GitHub issue

Animated 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aghassemicommented, Feb 22, 2018

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)

1reaction
RReversercommented, Feb 15, 2018

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found