Page MenuHomePhabricator

Experiment with a player for animated gif/png
Open, LowPublic


Our support for animated GIFs (and PNGs) is rather pathetic.

We basically bail out as soon as it becomes too much to resize, which protects the website, but doesn't really give a good user experience. See also:
T63711 and T25063

Then there are people who would like to stop them T85838, or change the default state T85840.


    • Default everything to single frame thumbs
    • Add a library to JS load animated images on demand
    • Add an option: autoplay to give current playback behavior.
  1. Simply encode all animated GIFs as WebM and use those: T105276: Convert animated images (animGIF, APNG) to HTML5 video

Event Timeline

TheDJ raised the priority of this task from to Low.
TheDJ updated the task description. (Show Details)

Change 216538 had a related patch set uploaded (by TheDJ):
On demand playback of animated images

TheDJ set Security to None.

I think this is a reasonable way forward. Thanks! :-)

Can you describe what it's supposed to do? On mobile all I see is a series of images larger than the screen that I have to individually scroll past from one to the other.

It's sort of halfway between a video (or animated gif) and static images. On my Mac, when the page loads, it looks like one image. When I do a two-finger scroll downwards on the image (hint: scroll very slowly), it scrolls rapidly through the images. This makes it look like you're seeing a video (in this case, of someone swallowing a radiopaque substance), but it's easy to stop on any "frame", and each "frame" is an individual, static image that can be used separately.

Ah, that's pretty cool! Would need some work to make it more accessible on touchscreen devices and other folks without convenient scroll wheels, but that's a nice way to scrub back and forth through an animation.

Could probably do a similar behavior for HTML5 video; doing it for animated GIFs requires either decomposing them to PNGs (as in your demo), converting to video, or using client-side JavaScript to 'manually' decode and play the GIF... but is definitely possible and worth looking at!