Skip to content Skip to sidebar Skip to footer

Importing Public Folder Images In Src Css Files In Reactjs

I need to import some assets from public folder. I can do it easily in html; it wont give an error. However, I can not do it with css url() method. I need to do this since react en

Solution 1:

i'm currently unable to comment so i'll have to write it as an answer, can you pleas try

background-image: url("./media_assets/img/footer-xsm.png");

if it didn't work just flag it as unuseful and go check this you'll find a solution there

Post a Comment for "Importing Public Folder Images In Src Css Files In Reactjs"