I\'m using create-react-app
, and I am struggling to load images. I am following the instructions as specified here, but I keep seeing the following error:
Are you sure you've got the correct path? Also when you import an image via css (as is done in the example you mentioned) you need to give a path relative to the public folder and not the src folder. I have run into this problem several times.
An example using import:
import Image from './img.png'
...
// react example
...
render() {
return (
// notice the curly
...
and not