I am currently using React and Next.js and next-images to import images
I want to pass data and directly receive it in my img src url like below:
<img src={require(`../src/image/${data}`)} />
But it seems like the backtick and the template string? don't seem to work in the img tag's option. Is there any way to receive data directly to the src url?