Here is a codepen and at the bottom of this question is the actual code. Although the code works fine in Chrome, for some reason image elements in an svg<
image
svg<
The width and height attributes must be assigned to the image element in the actual HTML for SVG version 1.1:
width
height