Reputation: 11
I have stored the image name in local storage. The question is how to display image in reactjs.
Upvotes: 0
Views: 312
Reputation: 96
const url = localStorage.getItem('imageName')
<img className="attached_image" src={url} alt="my upload" />
Get your image name from local storage and save its value in a variable which you can use next in img tag.
Hope this helps.
Upvotes: 2