4 ms·
Not sure what they meant, but my only guess is they mean via an img tag. <img src="some.svg">
by itslennysfault 4y ago
Not sure what they meant, but my only guess is they mean via an img tag.
<img src="some.svg">
- pcthrowaway 4y agoDerp.. I've been rendering svgs in JSX for so long, I forgot about the obvious things like <img>, <link>, even adding an svg in CSS with background-image
- eithed 4y agoYup. You can also do <svg src="some.svg"/> But I was talking about embedding which is, I think much nicer. The only difference between both cases I was able to find is that if SVG is loaded via src, it will be a separate `document`. If it's embedded, it's part of DOM tree of HTML document that is being viewed.