{"record":{"id":"8384ffafbf0a4e91","repo":"vercel/next.js","slug":"specified-images-should-be-an-object-received-ty","errorCode":null,"errorMessage":"Specified images should be an object received ${typeof images}.\\nSee more info here: https://nextjs.org/docs/messages/invalid-images-config","messagePattern":"Specified images should be an object 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":718,"sourceCode":"\n    if (result.basePath !== '/') {\n      if (result.basePath.endsWith('/')) {\n        throw new Error(\n          `Specified basePath should not end with /, found \"${result.basePath}\"`\n        )\n      }\n\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      ) {","sourceCodeStart":700,"sourceCodeEnd":736,"githubUrl":"https://github.com/vercel/next.js/blob/34433fd12ee8074ea3f47af9f36255c7390d0301/packages/next/src/server/config.ts#L700-L736","documentation":"Images config validation in assignDefaultsAndValidate: result.images is present but typeof images is not 'object' (e.g. a string or boolean). The whole images block must be an options object; the received type is named and the error links the invalid-images-config docs.","triggerScenarios":"images config is not an object.","commonSituations":"Passing an array or primitive as the images option in next.config.","solutions":["Set images to an object in next.config.js."],"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"}