Animated PNG (APNG) fallback to gif in unsupported browsers?

Viewed 994

So apparently APNGs fall back to the first frame for unsupported browsers

But is there a way to make it fall back to a gif in unsupported browsers, like we do for webP?

<picture>
  <source srcset="image.webp" type="image/webp">
  <source srcset="image.jpg" type="image/jpeg">
  <img src="image.jpg">
</picture>
1 Answers

This works! (I thought it was just because the support for <picture> and animated png are very similar (here & here), but it also works in 'UC Browser for Android', which apparently supports <picture> but not APNG)

<picture>
  <source srcset="image.png" type="image/apng">
  <source srcset="image.gif" type="image/gif">
  <img src="image.gif">
</picture>
Related