Tailwind url
Answered
Spectacled Caiman posted this in #help-forum
Spectacled CaimanOP
If i have an svg in /public called
test.svg, how can I reference this in a component somewhere in my app directory? I'm trying after:content-[url('../public/test.svg')] but it's not able to get the svg. I'm not sure where the url starts searching from4 Replies
Oriental chestnut gall wasp
In my experience, .svg files are a little tricky to work with.
Are you using a webpack loader for .svgs like
svgr?@Spectacled Caiman If i have an svg in /public called `test.svg`, how can I reference this in a component somewhere in my app directory? I'm trying `after:content-[url('../public/test.svg')]` but it's not able to get the svg. I'm not sure where the url starts searching from
after:content-[url('/test.svg')]
Answer
@joulev after:content-[url('/test.svg')]
Spectacled CaimanOP
worked, thanks!