Reputation: 96586
I have an inline SVG something like this:
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<image xlink:href="img.jpg"></image>
</svg>
It works fine in Chrome and even Safari, but in IE11 and Edge it doesn't display the image. Other elements like lines display.. ok (they're totally the wrong size but at least I can see them). Is there a way to make the image work? Maybe with a polyfill?
Upvotes: 2
Views: 1384
Reputation: 124049
IE and Edge don't yet implement the SVG 2 change that allows width and height attributes to be omitted. Neither does Firefox FWIW.
To fix, add explicit height and width attributes with valid values to the image.
Upvotes: 5