I had the same error but what I have done to fix it is to incorporate in the next.config.js
file the URL
of my media files, in my case it is cloudinary, the file should look like this:
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
domains: [
'res.cloudinary.com'
],
},
}
module.exports = nextConfig
And when I use the image component (next/image) I remove the loader and just put the URL like this:
<Image
key={element.id}
src={element.url}
width={500}
height={500}
alt="some description"
/>
I don't use unoptimized={true}
because the point is that the component changes the quality of the image according to the client's device.
good look :)
loader
isn't doing anything), you might as well just useunoptimized={true}
on theImage
. – Irrespirable