I'm currently making a React application where you can find drink recipes. All the drink recipes are located in a MongoDB. When I GET a drink from the database I want to display the recipe with an image but I'm unable to require it by doing the following.
<img src={require(`../images/${drink.filename}`)} alt=""/>
Error: Cannot find module './'
I don't know if this is even possible or if I have to do it another way but thanks in advance :)