Display images in React using JSX without import
Solution 1:
You need to require the file like so:
<img src={ require('./images/image1.jpg') } />
Solution 2:
require
is used for static "imports", so you just need to change your imports
.
Example:
var imageName = require('./images/image1.jpg')
<img src={imageName} />