SVG with external images doesn't load them when embedded with <img> tag in browsers
- by mat3001
I made the following observation:
If I create an svg image that references an external raster image via "xlink:href" and try to load the svg in browsers, the external images are only shown if I use the tag, but not when using the tag.
Rendering with the tag is quite slow and not as clean as using the img tag for images so I was wondering if there's a way to make it work through the tag.
At first I thought it doesn't work because of a same origin policy, but even if the referenced image is in the same directory and I reference it through its name only, it wont load.
Any ideas?