APNG animations don’t play in Discourse when hotlinked:
They also lose their animation after they are downloaded to the server if download remote images to local is true.
Remote animated PNGs lose their animation in Discourse. Canapin reported that APNG animations don’t play when hotlinked and also lose their animation after being downloaded to the server if download remote images to local is true. Discourse currently only supports GIF, WEBP, and AVIF animated image formats. Falco suggested that adding APNG support would require patching both the core and the fastimage library. Falco later found that Steam uses APNG for their animated stickers, which could be an indicator that Discourse should add support for it. Falco worked on initial support for FastImage and submitted a PR that would automatically add animated PNG support to Discourse if merged.
APNG animations don’t play in Discourse when hotlinked:
They also lose their animation after they are downloaded to the server if download remote images to local is true.
Discourse doesn’t support APNG. The only animated image formats we support are GIF, WEBP and AVIF.
If someone wants to work on this you will need to patch both core, as we skip many image optimizations for animated images, both in front-end and in the backend, and write a binary APNG detector in the fastimage library.
Moving to Contribute > Feature request and adding pr-welcome.
Just found out that Steam is using APNG for their animated stickers, another indicator that we should add support for it.
Can you share some APNGs you have so I can test this feature?
I worked on initial support for FastImage in my PR:
When/If this gets merged Discourse will automatically support animated PNGs.