I am new in reactjs and i am working with nextjs,I am fetching image from datbase via api, Right now i am getting image name with full path ( url.com/imagename) but i want to know how can we use dynamic path, in other words if i have only "image name" (not full path) so how can i append "image path" for display image using next js? I tried with following code
{this.state.books.map((post, index) => {
return (
<div className="col-md-4"
<div className="bookimg">
<img src={post.image} />
</div>
</div>
)
})}
const imageSrc = `https://example.com/${post.image}`;?