edemaine / cocreate

Cocreate Shared Whiteboard/Drawing
MIT License
209 stars 27 forks source link

Add xlink:href to exported images for Inkscape #165

Closed psvenk closed 3 years ago

psvenk commented 3 years ago

Inkscape does not respect the href attribute on <image> elements, so it is necessary to add the xlink:href attribute for images to be displayed properly in Inkscape.

psvenk commented 3 years ago

@edemaine Thank you for your changes and for merging. I would just like to note that the reason why I duplicated the image was that xlink:href is deprecated, meaning that it might not work in some environments (without also having xhref), though I'm not sure how much of an issue this would be in practice.

edemaine commented 3 years ago

Thanks for pointing out and fixing this bug!

While xlink:href is deprecated in SVG 2, I believe all implementations support SVG 1.1, and it's not worth duplicating large images over. It's sad that Inkscape hasn't updated yet, but it's an important platform to support.