Hi folks. I’m trying to export frame to PNG and convert it to another format.
Library I use: webp-converter-browser
I use webpack to bundle all things. looks good.
But when I use the plugin on Figma environment, I always get the error:
referenceError: “blob” is not defined.
then I change from using blob to Buffer, I got:
referenceError: “Buffer” is not defined.
Sometimes it says “Unhandled promises” as well.
Please help me on this.
- export current frame to PNG using exportAsync ( → Uint8Array)
- convert the pngBytes to pngBlob
- convert pngBlob to webpBlob
- Download webpBlob
(I was trying using pngBuffer but still got similar problem)