Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Thumbnailing animated GIFs (or showing they're an animation) (SYN-251) #1278

Open
matrixbot opened this issue Jan 28, 2015 · 17 comments
Open
Labels
A-Media-Repository Uploading, downloading images and video, thumbnailing T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. z-feature (Deprecated Label)

Comments

@matrixbot
Copy link
Member

(Imported from https://matrix.org/jira/browse/SYN-251)

(Reported by @ara4n)

@matrixbot
Copy link
Member Author

Jira watchers: @ara4n

@matrixbot matrixbot added the z-feature (Deprecated Label) label Nov 7, 2016
@matrixbot matrixbot changed the title Thumbnailing animated GIFs (or showing they're an animation) (SYN-251) Thumbnailing animated GIFs (or showing they're an animation) (https://github.com/matrix-org/synapse/issues/1278) Nov 7, 2016
@matrixbot matrixbot changed the title Thumbnailing animated GIFs (or showing they're an animation) (https://github.com/matrix-org/synapse/issues/1278) Thumbnailing animated GIFs (or showing they're an animation) (SYN-251) Nov 7, 2016
@richvdh
Copy link
Member

richvdh commented Aug 19, 2019

You want animated thumbnails?

(Related: #4347)

@anoadragon453
Copy link
Member

Worth noting that fixing and enabling this will also animate thumbnails in URL previews.

@ShadowJonathan
Copy link
Contributor

Worth noting that element-hq/element-web#11481 led me here.

(I'll poke at this, see how hard it is)

@ptman
Copy link
Contributor

ptman commented Mar 29, 2021

Correct me if I'm wrong, but the thumbnails probably shouldn't be GIF, but some video format instead. IIRC this is what many GIF hosting sites do to conserve space and bandwidth.

@ShadowJonathan
Copy link
Contributor

@ptman What kind of video format would you recommend? I'm currently working on this with #9705, creating smaller GIFs for thumbnails. I saw arguments against webm and webp for their limited support (which i doubt, but i take into account), so I'm curious what could be a good default for matrix in this regard.

@ptman
Copy link
Contributor

ptman commented Mar 29, 2021

VP8/WebM should be widely supported ( https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Video_codecs#recommendations_for_everyday_videos ). I doubt anyone who can't support it needs animated previews/thumbnails. An alternative would be to generate different versions, but that wouldn't save space, only bandwidth.

@ShadowJonathan
Copy link
Contributor

ShadowJonathan commented Mar 29, 2021

Hmm, i agree, but just for reference, i took gif > webm because discord uses GIFs for animated avatars and emojis (and i think they have done some research on the benefits and tradeoffs of both), though I also wonder if webm supports transparency.

@ptman
Copy link
Contributor

ptman commented Mar 29, 2021

I was surprised that APNG is well supported these days as well: https://caniuse.com/apng . So I guess that's also an option

@fullmetal1
Copy link

@ShadowJonathan webm does support transparency. I have seen a few around, but they're very rare.

@G2G2G2G
Copy link

G2G2G2G commented Jul 23, 2021

@ptman https://caniuse.com/avif is rapidly coming too so worth supporting similar to gif/apng.. jxl not really worth it as far as animation goes.

@erikjohnston erikjohnston added the T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. label Jul 26, 2021
@Mikaela
Copy link
Contributor

Mikaela commented Aug 8, 2021

Please see also element-hq/element-web#15790 and consider the accessibility of animations.

@anoadragon453
Copy link
Member

@Mikaela could you elaborate on the accessibility difficulties surrounding animated thumbnails and what one should be aware of when implementing this?

@Mikaela
Copy link
Contributor

Mikaela commented Aug 27, 2021

@anoadragon453 My issue is that when there is a blinking/moving gif visible, it will drag my focus and my ability to read what happens in the room or whichever interface I am in decreases.

@GeoffLedak
Copy link

What's the status of this? I got a Synapse server and self hosted Element set up last week. If I use the Element Android app, gif previews are animated properly.

If I use the Element web client, I only see the first frame of the gif in previews.

@GeoffLedak
Copy link

Checking in on this again. Being able to paste a link to an animated gif and instantly see an animated preview in chat is a mandatory feature for my friends and I. We cannot use Element and Matrix without this feature. We're still using Discord at the moment, and the lack of proper animated gifs in the chat is the only thing that is preventing us from switching over to Matrix.

This works correctly in the Android version of Element; gif previews are properly animated in the chat. In the web version of Element, only the first frame of the animated gif is shown in the preview.

Someone should really make fixing this a priority.

@williamkray
Copy link
Contributor

Checking in on this again. Being able to paste a link to an animated gif and instantly see an animated preview in chat is a mandatory feature for my friends and I. We cannot use Element and Matrix without this feature. We're still using Discord at the moment, and the lack of proper animated gifs in the chat is the only thing that is preventing us from switching over to Matrix.

This works correctly in the Android version of Element; gif previews are properly animated in the chat. In the web version of Element, only the first frame of the animated gif is shown in the preview.

Someone should really make fixing this a priority.

If this is such a critical feature for you, and since you are running your own server, you could leverage the Matrix Media Repo project which already supports animated thumbnails and runs in parallel to synapse.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Media-Repository Uploading, downloading images and video, thumbnailing T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. z-feature (Deprecated Label)
Projects
None yet
Development

Successfully merging a pull request may close this issue.