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

WebP/APNG images shown as GIF #24015

Open
germain-gg opened this issue Dec 15, 2022 · 5 comments
Open

WebP/APNG images shown as GIF #24015

germain-gg opened this issue Dec 15, 2022 · 5 comments
Labels
A-Media O-Occasional Affects or can be seen by some users regularly or most users rarely S-Tolerable Low/no impact on users T-Defect

Comments

@germain-gg
Copy link
Contributor

Steps to reproduce

  1. Send a webp image. See the GIF

Outcome

What did you expect?

Not to see the "GIF" toast on the top left

What happened instead?

Screenshot 2022-12-15 at 09 37 27

Operating system

No response

Browser information

No response

URL for webapp

No response

Application version

No response

Homeserver

No response

Will you send logs?

No

@germain-gg germain-gg added T-Defect S-Tolerable Low/no impact on users A-Media O-Occasional Affects or can be seen by some users regularly or most users rarely labels Dec 15, 2022
@t3chguy
Copy link
Member

t3chguy commented Dec 15, 2022

Yeah IIRC some other platform does the same thing so I copied it - thought "WEBP" would just look confusing and some platforms even send "GIF"s as MP4s nowadays so the word seems to have lost all meaning.

@germain-gg
Copy link
Contributor Author

I don't really understand why an overlay is needed here. We do not show anything for JPG or PNG. Why treat webp differently?

I can understand the argument for animated webp. But the images above are still.

Not quite sure why you added the X-Needs-Design label for? This sounds more like a defect to me where we should not show the GIF overlay at all.

@t3chguy
Copy link
Member

t3chguy commented Dec 15, 2022

It should be only shown on animated WEBP images. The overlay is there as a hint that hovering plays the animation. blobIsAnimated actually checks for the animated flag in the blob.

It even has tests - maybe your image is actually a 1-frame animated WEBP image

image

Indeed, the label was assuming that you were complaining it said GIF for an animated WEBP. Nothing in the OP made it clear they weren't animated, screenshots are poor at conveying animation.

@HarHarLinks
Copy link
Contributor

maybe your image is actually a 1-frame animated WEBP image

could Element be made to check for that? I have had the same issue before. There are always going to be "improper" webps like this in the wild as this isn't usually obvious to users.

@t3chguy
Copy link
Member

t3chguy commented Dec 15, 2022

Yes it could, but writing a full WEBP parser would add a lot more complexity and edge cases to test. I couldn't find a minimal one to just import at the time of writing it initially. Contributions welcome.

@t3chguy t3chguy changed the title WebP images shown as GIF WebP/APNG images shown as GIF Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Media O-Occasional Affects or can be seen by some users regularly or most users rarely S-Tolerable Low/no impact on users T-Defect
Projects
None yet
Development

No branches or pull requests

3 participants