I have a react.js project and need to display an image using the <img>
tag.
I have an endpoint to get the image.
I can see the image is loading in the network tab like this.
Even though the preview section is like this if I console log the response payload it has a data property with strange symbols which I believe is the image.
How do I generate a file in the front end to pass the src
attribute of the img
tag.