Animated GIFs with createImage

We’ve been using createImage with a plugin for awhile now without issues. But we recently introduced a set of animated GIFs and—unless I am missing something—the animation is getting stripped by this API function and Figma treats the fill as a static image and not a GIF.

As far as I can tell, the Uint8Array that we feed to createImage is the same as what we load from the remote server and are able to preview (with animation) in our UI.

Possibly related to GIFs not available in the API :thinking:

Well, not sure when the following was added to the docs, but I had missed it. I’m guessing this is my issue:

The example above won’t work for GIFs, which are more like video files than image files. In fact, <canvas> doesn’t really support GIFs. You will need to use a third-party Javascript library capable of encoding and decoding GIFs.

End of the page on this doc.