Skip to content

Conversation

@marcustyphoon
Copy link
Collaborator

@marcustyphoon marcustyphoon commented Aug 18, 2025

Description

This applies Disable GIFs to animated WebP images—but not, if possible, to non-animated WebP images—by downloading them and parsing them with the new WebCodecs API.

This intentionally keeps our current behavior of assuming, sometimes incorrectly, that any gif (or gifv) image is animated, as checking if an image is animated involves fetching it, which is kind of expensive.

ImageDecoder is feature detected; in Firefox 128, this falls back to not affecting webp images.

Supersedes #1402 (which vendored a library to do this), #1563 (which paused and put labels on webp images regardless of whether they were animated or not), and #1709 (earlier, essentially-equivalent version of this PR).

Resolves #1401.

Testing steps

Animated WebP: https://www.tumblr.com/changes/758172275271991296/threaded-replies-are-here
Animated GIF: https://www.tumblr.com/@radar/757906400962920448, https://www.tumblr.com/april-codes/700206746833240064
Non-animated GIF: https://www.tumblr.com/@radar/753920129042153472
Non-animated WebP: https://www.tumblr.com/minmos/744793127262601216/front-facing-egrets-making-me-lose-control-of, https://www.tumblr.com/@radar/755279084134744066, https://www.tumblr.com/@radar/750568043810340864

Confirm that:

  • animated WebP images in posts are paused
  • non-animated WebP images in posts are not paused
  • animated GIF images in posts are paused
  • non-animated GIF images in posts... are still incorrectly paused, as it would be too expensive to check every GIF.

Copy link
Owner

@AprilSylph AprilSylph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@marcustyphoon marcustyphoon merged commit 4cefae7 into master Aug 19, 2025
5 checks passed
@marcustyphoon marcustyphoon deleted the marcustyphoon/disable-gifs-pause-webp branch August 19, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AccessKit: Pause animated webp images

3 participants