I’m having trouble using an SVG in CSS.
I’m using sage 10. Following this:
I have this CSS:
.submit-search:after {
content:url('../images/icons/search.svg');
}
and I have an image at resources/images/icons/search.svg
I don’t get an error running yarn dev (but i do if i change the pathname to a non-existent image), which indicates to me tat the image exists just fine on the server.
When I load the page, however, dev tools says that it’s looking for an image at domain.com/images/icons/search.svg, which doesn’t exist.
What am I doing wrong here?
And does anyone know the correct way to include an image in JS?