FigmaToCode
FigmaToCode copied to clipboard
svg option
is there any option export images as svg base64 string ? just assigned to src property of img tag
Yes, but that's complex. I can't differentiate an svg from png. Sometimes it is a group of vectors, then it is easy, but if there are frames or rectangles mixed together, what do I do? I never solved this.
Still, I want something like a export to code sandbox where I would do this.
If you have decided that an element is a picture, you can go something like this. As you know, we can export as svg or png by selecting the export option in the right corner of Figma program. In fact, the image appears as base64 in the preview section.
Maybe you can trigger these steps automatically in the background and get the base64 format of that picture.