'referencing an image in public folder react js [closed]
This is driving me slightly mad. I've searched all around and think I am doing everything right...But clearly am not!
All I'm trying to do is set a bg image from a picture in my public folder, but it keeps throwing an error!
(see below, code with folder tree and error message)
Even the greyed out code on line 10 does not work.
Any help would be much appreciated.
Many thanks from the #noobcoder, ClaaziX
Solution 1:[1]
By defaul your public folder is accessible anywhere in your code just reference it like this below, change your image src to something like this
<img src='/images/Lightning.jpg'/>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | solomon Yunana |


