Skip to content
DocsErrors`next/image` Un-configured localPatterns

`next/image` Un-configured localPatterns

Why This Error Occurred

One of your pages that leverages the next/image component, passed a src value that uses a URL that isn't defined in the images.localPatterns property in next.config.js.

Possible Ways to Fix It

Add an entry to images.localPatterns array in next.config.js with the expected URL pattern. For example:

next.config.js
module.exports = {
  images: {
    localPatterns: [
      {
        pathname: '/assets/**',
        search: '',
      },
    ],
  },
}