2

Given this small svg file:

<svg height="400" width="400" viewport="0 0 400 400" class="svgScreenshot1" version="1.1" id="svg20" xmlns="http://www.w3.org/2000/svg">
  <ellipse cx="200" cy="200" rx="190" ry="190" fill="none" stroke="black" class="hidden"></ellipse>
  <image href="../images/g17172.png" x="218" y="237" width="32.77756653992395" />
</svg>

The file "../images/g17172.png" is valid.

The svg opens correctly in all major browsers, but when opened in Inkscape, only the ellipse shows up.

I have tried using absolute path instead of relative, and removing most properties, but it always leads to only the ellipse showing up.

Does Inkscape support linked images at all? Is there something obvious I am missing?

1 Answer 1

4

Inkscape requires the xlink: namespace for the href attribute on the <image>-tag (and other elements like <use>).

Most browsers nowadays understand it without that, but it seems like Inkscape still requires it.

Simply change it to xlink:href= on the image element and add the xmlns:xlink="http://www.w3.org/1999/xlink" namespace to the <svg>-tag.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.