קבצי PNG מונפשים מרחוק מאבדים את האנימציה שלהם

סיכום מבוסס בינה מלאכותית

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.

2 לייקים

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.

5 לייקים

Just found out that Steam is using APNG for their animated stickers, another indicator that we should add support for it.

3 לייקים

Can you share some APNGs you have so I can test this feature?

לייק 1

I worked on initial support for FastImage in my PR:

When/If this gets merged Discourse will automatically support animated PNGs.

2 לייקים