Next.js Discord

Discord Forum

Next JS image tag showing unrecognized host

Unanswered
Pigeon tremex posted this in #help-forum
Open in Discord
Pigeon tremexOP
I have my NEXT JS config file as
/** @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 ?

0 Replies