Just like how CSS styles like fill, stroke being set via CSS, is there a way to set image (background-image) to an SVG element using CSS alone?
Some existing solutions have <image>
tag within the <svg>
element, but I don't want to have that since I'm using a third-party library that generates the SVG, so CSS seems to be a good alternative.
Update:
I would like to add a background
to a specific svg
element, not the whole SVG. Didn't realize that it wasn't mentioned in the actual question earlier.