website-logomedCode

How to Allow domains for Images Next.js Config

To allow Next.js to display images from all domains, modify your next.config.js file to add an object with protocol and hostname....
MOHAMMED DAKIR| November 10, 2023
next.js
How to Allow domains for Images Next.js Config

#Nextjs #dev #tools #productivity #coding

To allow Next.js to display images from all domains, modify your next.config.js file to add an object with protocol and hostname properties to the remotePatterns array property.

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  // other properties...remotePatterns: [
    {
      protocol: 'https',
      hostname: '**',
    },
  ],
};

module.exports = nextConfig;

This website uses cookies to enhance your browsing experience, analyze site traffic, and serve better user experiences. By continuing to use this site, you consent to our use of cookies. Learn more in our cookie policy

Explore the latest insights, articles,free components, and expert advice on programming and software development

© Copyright 2024 MED DAKIR. All rights reserved./privacy policy