I am currently having trouble rendering an image from a local file. I have tried these options
<Image src={require(this.state.image)} className="image" roundedCircle/>
Import testImage from “../image.png”
I have looked at other StackOverflow posts, and most of them use the first method with the require. However, require does not work for me. The import statement does in fact work for me, but I am trying to dynamically render an image. I have also put the image in the css using the url() function, but I don’t think that will be dynamic.
Are there any other options that I could go for? Also, if anyone knows how to get require to work, that would be great.