Hello everyone,
I have found the solution by following the strapi documentation. install qs and create an api call, then in the src use the following syntax:
<img
src={`${process.env.apiLocalHost}`+product.attributes.img.data[0].attributes.url}
layout='fill'
alt={product.attributes.tittle}
className="w-full h-full object-center object-cover lg:w-full lg:h-full"
/>
I hope it works for you, if not, please leave a comment and I will help to solve it as soon as possible.