by bsimpson · 13y ago · 0 comments
<img src = "my_icon.svg" this.onerror = "my_icon.png" />
SVG is future-proof, scaling elegantly to match whatever display it's being viewed on. And, if you don't care about supporting older versions of IE, you can skip the onerror, leaving you with only one asset per image to maintain.