Does anyone have best practices around using background images? I tried using tailwind's bg-[url()] property, but it only works if I hardcode an external URL. I can't even get it to work with css. For example, I'm setting background-image: url('/public/img/aerial.jpg'); and vite correctly adds it to manifest.json. When I inspect the element in the iPhone simulator is has background-image: url(/build/assets/aerial-Dmwjxc-y.jpg); but the image still gives a 404 even though the file exists.
#Background image not working unless using the full, hardcoded url
1 messages Β· Page 1 of 1 (latest)