Next JS image tag showing unrecognized host
Unanswered
Pigeon tremex posted this in #help-forum
Pigeon tremexOP
I have my NEXT JS config file as
which means to accept all the images. Not this does work when I put height and width in the Image component, but when I keep object-fit:"cover", it shows unrecognized host error. How to fix this ?
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**',
},
],
},
};
export default nextConfig;which means to accept all the images. Not this does work when I put height and width in the Image component, but when I keep object-fit:"cover", it shows unrecognized host error. How to fix this ?