Jump to content
You must now use your email address to sign in [click for more info] ×

SVG exports should use UUIDs for internal IDs


Recommended Posts

Affinity exports use IDs on various items such as gradients. They are defined in a section called <defs>. The IDs are of the form "_Linear1", "_Linear2" etc.

The problem is if you try to inline these SVGs into an HTML page the IDs conflict and the final one overrides the previous ones which messes up the images. Inlining SVGs files in HTML is a pretty common use case. There appears to be no value in having meaningful names within the SVG file and they are not controllable by the user from the Affinity programs. 

If Affinity used UUIDs for the ID values instead of "_Linear1" then this will not be a problem as each ID will be completely unique and not conflict with any other ID in another SVG generated.

I wrote a tool to rewrite the SVGs with UUIDs and it fixes the problem for me, however it would be far more convenient if Affinity produced them like this in the first place.

Thank you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.