A Python 3 script to insert SVG files into Adobe XD Project Files.
The XD team at Adobe have done a fantastic job developing Adobe Experience Design for MacOS and now for Windows. However, there are some features that are missing from the Windows version of the application have been in the Mac version for quite some time. One of the biggest features missing is the ability to insert SVG images into Adobe XD Projects. This script seeks to fill in that gap by utilizing the file structure of .xd files to insert SVGs.
This script requires xmltodict to be installed on Python 3.
NOTE: SVG must be optimized so that they contain only <svg>
as the root element followed by any <path>
elements that are part of the image. This can be done manually or using a tool such as svgo.
Thanks to some help from szh123, we no longer have to optimize the SVG before using it in the tool!
- Create a new XD file and place a shape (such as ellipse, rectangle, Pen tool) NOT ON AN ARTBOARD
- Then open up a command-line in the place where the XD file and SVG are located
- Run
python insertsvg.py path_to_svg path_to_xd
replacingpath_to_svg
with the relative path to the SVG file andpath_to_xd
to the relative path to the XD file. - If successful, it should print out
SVG Added
andTemporary Files Deleted
- Doesn't work when there is an artboard in the file
- No fills, effects, outline colors
Please create Issues if you find any other bugs.