[bug] still-image doesn't detect extensionful APNG with mediaproxy off #381
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#381
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Version
ed0b403
What were you trying to do?
Uploaded an APNG image.
https://akko.wtf/notice/Ag95iENE4XtQrDMXKa
What did you expect to happen?
With still-image enabled, the image should not animate.
What actually happened?
The image animates.
This is because still-image only falls back to detectAnimationWithFetch with extensionless URLs. Additionally, it will still greedily mark local .gif and .webp images as animated, even though CORS would allow fetching them just fine.
// Hail mary for extensionless
if (extension.includes('/')) {
// Don't mind the CORS error barrage
this.detectAnimationWithFetch(image)
}
I know it's basically impossible to reliably detect animated images without mediaproxy, but it should at least work correctly for local media. :P
Severity
I can manage
Have you searched for this issue?
Tangential note: while
.png
is often used as well (like in the example post), the canonical extension for APNG images is.apng
. Regardless of local or not, we could always match at least the latter.