React import image from local storage

How can i import local storage image in react?

My data looks like this;

{ image:"newimage.jpeg" }

and I tried to do this:

<img src={require("../../assets/images/`${data.image}`")}>

But its not working. Any suggestion will be glad.

3 answers