Home > Blockchain >  I was using a <Image /> tag in Next.js using a link of an image and it was showing an error
I was using a <Image /> tag in Next.js using a link of an image and it was showing an error

Time:06-25

I have tried it several times but the error was the same.
I have also created the next.config.js file

module.exports = {
    images: {
      domains: ['link.papareact.com', ],
    },
  };


Error: Invalid src prop (https://links.papareact.com/ua6) on `next/image`, hostname "links.papareact.com" is not configured under images in your `next.config.js`
See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host

any solution for this asap.

CodePudding user response:

Try this :

module.exports = {
    images: {
      domains: ['link.papareact.com/*']
    }
  };

  • Related