Currently have following code with an image source with an svg extension, works fine in Chrome and Firefox, image does not appear in Safari, even with the "onerror" added:
<li><img src="/assets/ResnateThickerSquare.svg", onerror="/assets/ResnateLiHome.png", onclick="home()", id="homeSquare"></li>
Assumed this was because of the svg extension, tried following advice from this stackoverflow question (Do I use <img>, <object>, or <embed> for SVG files?) and rewrote the code as follows:
<li><object data="/assets/ResnateThickerHome.png" type="image/svg+xml", onclick="home()" , id="homeSquare"><img src="/assets/ResnateLiHome.png"></object></li>
Again, it worked in Chrome + Firefox, but not Safari. Should I be eschewing img and object for an svg tag as per this question: Svg with image inside is not showing in safari (I was under the impression that the tag was reserved for svg polygons and not imgs?)?