Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tomayac opened this issue Feb 14, 2018 · 5 comments

Comments

@tomayac
Copy link
Contributor

tomayac commented Feb 14, 2018

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: #30

Update: replaced "modern browsers" with "Safari Technology Preview".

@RReverser
Copy link

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

@simevidas
Copy link

simevidas commented Feb 15, 2018

@RReverser It did not. Expected in Safari 11.1 sometime next month.

Fwiw, <video src="gif.mp4" muted autoplay loop playsinline></video> is a pretty good replacement for animated GIFs. (It doesn’t work in Samsung Internet for Android, last time I checked.)

@tomayac
Copy link
Contributor Author

tomayac commented Feb 15, 2018

Note: not saying this should be implemented as img[src$=".mp4"], just saying it might be one option, apart from the video rewrite from @simevidas's comment above.

Chrome folks are tracking "video in images" as https://crbug.com/791658. General developer feedback on the idea seems positive (Twitter search, @brucelawson's blog post, @cramforce's tweet).

@aghassemi
Copy link
Contributor

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)

@Gregable Gregable removed their assignment Jul 18, 2018
@Gregable
Copy link
Member

Closing bug as this is an AMP Cache specific. That project is tracking at b/113542531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants