1

When exporting (for example) icons from Adobe XD as SVG files, the code contains ID's that are for me unnecessary. When I want to use the SVG files for instance inline in an HTML file, it will give ID duplications. I can get rid of the ID's manually, but I would like to know if there is a way to remove the ID's before exporting from XD?

E.g.:

<clipPath id="a"><clipPath id="c"><g id="b" clip-path="url(#c)"><g clip-path="url(#a)">

When you use more than one svg file, you will have duplications ID's :

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="84" height="84" viewBox="0 0 84 84"><defs><clipPath id="a"><rect width="47.5"
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="84" height="84" viewBox="0 0 84 84"><defs><clipPath id="a"><rect width="47.203"

The export settings I use (tried also the other options, without result):

export settings

I could not find this topic on the Adobe XD forums.

1
  • I don't know about doing this from inside your Adobe software, but there are SVG optimizing tools like Scour that can automatically remove unused ids (--enable-id-stripping). Also, for <clipPath>, IDs are required, otherwise you can't reference and use them on other elements.
    – Xrott
    Commented Jul 22, 2022 at 8:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.