{"record":{"id":"e123f6fe97da2625","repo":"vercel/next.js","slug":"specified-images-localpatterns-should-be-an-array","errorCode":null,"errorMessage":"Specified images.localPatterns should be an Array received ${typeof images.localPatterns}.\\nSee more info here: https://nextjs.org/docs/messages/invalid-images-config","messagePattern":"Specified images\\.localPatterns 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":725,"sourceCode":"\n      if (result.assetPrefix === '') {\n        result.assetPrefix = result.basePath\n      }\n    }\n  }\n\n  if (result?.images) {\n    const images: ImageConfig = result.images\n\n    if (typeof images !== 'object') {\n      throw new Error(\n        `Specified images should be an object received ${typeof images}.\\nSee more info here: https://nextjs.org/docs/messages/invalid-images-config`\n      )\n    }\n\n    if (images.localPatterns) {\n      if (!Array.isArray(images.localPatterns)) {\n        throw new Error(\n          `Specified images.localPatterns should be an Array received ${typeof images.localPatterns}.\\nSee more info here: https://nextjs.org/docs/messages/invalid-images-config`\n        )\n      }\n      // avoid double-pushing the same pattern if it already exists\n      if (\n        !images.localPatterns.some(\n          (pattern) =>\n            pattern.pathname === '/_next/static/media/**' &&\n            pattern.search === ''\n        )\n      ) {\n        // static import images are automatically allowed\n        images.localPatterns.push({\n          pathname: '/_next/static/media/**',\n          search: '',\n        })\n      }\n      if (","sourceCodeStart":707,"sourceCodeEnd":743,"githubUrl":"https://github.com/vercel/next.js/blob/34433fd12ee8074ea3f47af9f36255c7390d0301/packages/next/src/server/config.ts#L707-L743","documentation":"Error \"Specified images.localPatterns should be an Array received ${typeof images.localPatterns}.\\nSee more info here: https://nextjs.org/docs/messages/invalid-images-config\" thrown in vercel/next.js.","triggerScenarios":"images.localPatterns is not an array.","commonSituations":"Setting localPatterns to a string or object instead of an array in next.config images.","solutions":["Set images.localPatterns to an array of pattern objects."],"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"}