codeimage icon indicating copy to clipboard operation
codeimage copied to clipboard

🐞 - Blank svg when loading into Figma

Open zach-browserless opened this issue 2 years ago • 4 comments

Which @codeimage/* package(s) are the source of the bug?

Don't known / other

Please provide a screenshot or a video to a minimal reproduction of the bug

No response

Description

The exported .svg files open fine in a browser. But for some reason, when I import them into Figma they just show up as an empty box.

empty svg

Which browsers have you used?

  • [X] Chrome
  • [ ] Firefox
  • [ ] Safari
  • [ ] Edge

Which operating systems have you used?

  • [ ] macOS
  • [X] Windows
  • [ ] Linux
  • [ ] iOS
  • [ ] Android

zach-browserless avatar Jul 24 '24 13:07 zach-browserless

I also tried dropping the svg into a compressor (https://vecta.io/nano) and it decided to take it from 291KB. Here's the export I'm attempting, I've tried changing some options like background vs no background, but same thing happens. codeimage-snippet_24 to 66B

zach-browserless avatar Jul 24 '24 14:07 zach-browserless

Hi @zach-browserless , unfortunately this is an issue of the SVG export that relies on foreignObject, which figma doesn't support (I think due to their "security" constraints)

riccardoperra avatar Jul 24 '24 15:07 riccardoperra

This also happens in Adobe Illustrator

KyleTryon avatar Sep 06 '24 19:09 KyleTryon

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 04 '25 20:01 stale[bot]