I'm building a web app using React(frontend) and Node/Express(backend). Now, I've stored some images in a 'public' folder(in the backend--express). My goal is to fetch the images that are stored on the server and display them on my frontend page. Sort of like when you fetch JSON data from the server/database, convert it to JSON and display the data onto the HTML page.
I'm using express.static() middleware to serve the images that are in the backend. My problem is:
- How do I send the images back to the frontend, and make them display onto the HTML page(React Component)?
Because when I use POSTMAN and make a request to the backend, the image displays in the body:

But whenever I make a request(using fetch) for a specific image in React, nothing shows on the page:

Here's My React Code:


