{"record":{"id":"aaae1cde63462de5","repo":"vercel/next.js","slug":"specified-images-remotepatterns-should-be-an-array","errorCode":null,"errorMessage":"Specified images.remotePatterns should be an Array received ${typeof images.remotePatterns}.\\nSee more info here: https://nextjs.org/docs/messages/invalid-images-config","messagePattern":"Specified images\\.remotePatterns should be an Array received (.+?)\\.\\\\nSee more info here: https://nextjs\\.org/docs/messages/invalid-images-config","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/config.ts","lineNumber":768,"sourceCode":"        // static import images are automatically allowed\n        images.localPatterns.push({\n          pathname: '/_next/static/immutable/media/**',\n          search: '',\n        })\n      }\n    } else {\n      // All paths are not allowed for a search query by default.\n      images.localPatterns = [\n        {\n          pathname: '**',\n          search: '',\n        },\n      ]\n    }\n\n    if (images.remotePatterns) {\n      if (!Array.isArray(images.remotePatterns)) {\n        throw new Error(\n          `Specified images.remotePatterns should be an Array received ${typeof images.remotePatterns}.\\nSee more info here: https://nextjs.org/docs/messages/invalid-images-config`\n        )\n      }\n\n      // We must convert URL to RemotePattern since URL has a colon in the protocol\n      // and also has additional properties we want to filter out. Also, new URL()\n      // accepts any protocol so we need manual validation here.\n      images.remotePatterns = images.remotePatterns.map(\n        ({ protocol, hostname, port, pathname, search }) => {\n          const proto = protocol?.replace(/:$/, '')\n          if (!['http', 'https', undefined].includes(proto)) {\n            throw new Error(\n              `Specified images.remotePatterns must have protocol \"http\" or \"https\" received \"${proto}\".`\n            )\n          }\n          return {\n            protocol: proto as 'http' | 'https' | undefined,\n            hostname,","sourceCodeStart":750,"sourceCodeEnd":786,"githubUrl":"https://github.com/vercel/next.js/blob/34433fd12ee8074ea3f47af9f36255c7390d0301/packages/next/src/server/config.ts#L750-L786","documentation":"Error \"Specified images.remotePatterns should be an Array received ${typeof images.remotePatterns}.\\nSee more info here: https://nextjs.org/docs/messages/invalid-images-config\" thrown in vercel/next.js.","triggerScenarios":"images.remotePatterns is not an array.","commonSituations":"Setting remotePatterns to a non-array value in next.config images.","solutions":["Set images.remotePatterns to an array of pattern objects or strings."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"34433fd12ee8074ea3f47af9f36255c7390d0301","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}