Figma Support Forum

Large canvases and the /images API

I created a test document with a large frame, 16384pt square.

If I request a PNG version of it from the image API, I get a 5792px square. I would like it to be full size but I understand the memory and CPU limitations of rasterizing that on demand.

I found that if I requested a PDF version from the API, the file that comes back is full size, then I can rasterize that locally with something like Imagemagick.

I’d rather use SVG than PDF, though. But the SVG returned form the API is scaled as well. For example:

<svg width="5793" height="5793" viewBox="0 0 5793 5793" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="16384" height="16384" transform="scale(0.353553)" fill="#BC3131"/>
<rect x="2172.23" y="2172.23" width="1448.15" height="1448.15" fill="#C4C4C4"/>
</svg>

Why not just return the SVG at full size, rather than including the scale transform?

Additionally, it would be great to have a parameter to the API to determine whether to convert text to outlines or leave them as text nodes. Seems like it’s always outlines today.