-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
PNG file uploaded from Element X Android shows as GIF in Element Web #26467
Comments
I've also uploaded logs from Element X Android, if it helps. |
I've also seen this one. Let me know if you need additional debugging. |
Looks like https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/utils/Image.ts#L21C3-L21C3 export function mayBeAnimated(mimeType?: string): boolean {
// AVIF animation support at the time of writing is only available in Chrome hence not having `blobIsAnimated` check
return ["image/gif", "image/webp", "image/png", "image/apng", "image/avif"].includes(mimeType!);
} It's coming from this PR: matrix-org/matrix-react-sdk#8158 but the |
Its considered potentially animated (may be animated) - the mime type of APNG is https://en.wikipedia.org/wiki/APNG any of |
Yes, sorry, I took a shortcut: Also the code does not handle the case Edit Also: animated => |
while technically correct, this is causing confusion for users when the image is not in fact animated upon hover (or similar "start playback" interaction). it would be better if element tried to inspect a received png to see if it is animated and only then falling back to this default assumption that it might be.
I still like the different UX semantics of an animated image vs a video. i fear that the label "GIF" that we have gotten used to while technically incorrect still meets that expectation. compare to several "gif" sites such as giphy et al, or buttons in composers of e.g. discord, or buttons in (virtual) keyboards such as gboard. |
Steps to reproduce
Outcome
What did you expect?
The image is shown without the "GIF" bit on its upper right corner.
What happened instead?
The image is shown with the "GIF" bit on its upper right corner. The full event sent by Element X Android (after decryption) is:
I'm not fully sure whether this belongs on the Element Web repo or on the Element X Android one. It only happens when I send the image from Element X Android, but Element Web is the only client I see recognising it as a GIF (Element Android (not X) does not show the play icon it shows for GIFs).
I've wondered for a bit whether this might just be #24015, but it looks like a different issue since my image is sent with the
image/png
MIME type.Operating system
Arch Linux
Browser information
Firefox 118.0.2
URL for webapp
app.element.io
Application version
Element version: 1.11.47, Olm version: 3.2.14
Homeserver
abolivier.bzh
Will you send logs?
Yes
The text was updated successfully, but these errors were encountered: