react public image path code example
Example 1: how to write img jsx
<img src={window.location.origin + '/img/myImage.png'} />
Example 2: react src images from public folder
<img src={process.env.PUBLIC_URL + '/yourPathHere.jpg'} />
<img src={window.location.origin + '/img/myImage.png'} />
<img src={process.env.PUBLIC_URL + '/yourPathHere.jpg'} />