StillImage: Improved animated image detection #335
No reviewers
Labels
No labels
a11y
Bug
Bug fix
Critical Priority
Documentation
Feature
Feature request
Held for next release cycle
High Priority
Low Priority
Medium Priority
Minor change
Translation/Locale
WIP
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma-fe#335
Loading…
Reference in a new issue
No description provided.
Delete branch "yukijoou/akkoma-fe:still-image-better-gif-detection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This patch makes StillImage's animation detection return early in cases where we can't detect the mimetype of the image. It also sets the image as animated in those cases if the user agent wants reduced motion.
As reduced motion is an accessibility setting, I think it's best to use a "better safe than sorry" approach, it's better to accidentally mark something as animated that isn't than to have unblocked animations.
Note that this means that if reduced motion is enabled, and we can't figure out the mimetype of an image, it'll be watermarked with "GIF", even though that's not true. I can't see an easy solution to this, and don't think it's enough of a problem to warrant spending a bunch of time probably rethinking this whole system, so I think it's fine to just leave it as is!
yeah this is an edge-case, but one where i'm happy to accept the compromise of assuming things we can't detect are animated
seems fine to me
thankies!