The images are stored in the client/public/images folder. And the file name and extension is fetched from a mysql database. How do I write the src attribute of the img element to display the images.
<img src={`%PUBLIC_URL%/images/${portraitFile}`} alt='' />
this is not working
My project structure:
- public
-images
- portrait.jpg
- src
- components
- image viewer component
- App.js