How to use linked images with SVG?

Sorry if this has been asked before or is an old topic. I searched but did not find a specific answer and while posting to such sites using markdown is common place for me, the maze for this problem has more routes and dead ends then I want to spend days exploring only to find that a simple question would get the needed answer.

I can currently upload SVG files to a Discourse post and can also upload the images separately without problems, e.g.


The original SVG has links to local images, e.g.:

<image xlink:href="./Images/image_010.png" width="215px" height="184px" preserveAspectRatio="xMinYMin meet" x="1381.58" y="-4622"/>

but the uploaded SVG on Discourse does not bring the PNG images into the graphic.

I am aware that Discourse has a whitelist for SVG but don’t know the exact details.

I also DO NOT have admin rights on the site, but the admins are friendly and helpful.

How do I modify the image tag to link to the image so that it appears in the SVG and not as a footer image in the post?

Or is it that the link is fine and an admin needs to put the images in a corresponding Images directory?

I know that as a fall back I can probably embed the image as encoded text into the image tag, but would prefer to avoid this if necessary.

Example image:



Found this Discourse code
Maybe it is just as simple as changing the format of the link in the SVG to one of these.

Not an answer I want, but a work around that works with Discourse for those in need.

HTML can inline SVG, so instead of linking to the SVG in a separate file it is placed inline in the HTML.

The obvious reason I am not a fan of this is that now the SVG is duplicated, and becomes more of a maintenance nightmare if a change is made; have to hunt down and change all of the copies. :frowning_face: