{"record":{"id":"c753b90d7cd6ed66","repo":"gatsbyjs/gatsby","slug":"gatsby-plugin-image-mismatched-image-layout-exp","errorCode":null,"errorMessage":"[gatsby-plugin-image] Mismatched image layout: expected \"${defaultImage.layout}\" but received \"${image.layout}\". All art-directed images use the same layout as the default image","messagePattern":"\\[gatsby-plugin-image\\] Mismatched image layout: expected \"(.+?)\" but received \"(.+?)\"\\. All art-directed images use the same layout as the default image","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-image/src/components/hooks.ts","lineNumber":375,"sourceCode":"      sources: [],\n    },\n  }\n\n  artDirected.forEach(({ media, image }) => {\n    if (!media) {\n      if (process.env.NODE_ENV === `development`) {\n        console.warn(\n          \"[gatsby-plugin-image] All art-directed images passed to must have a value set for `media`. Skipping.\"\n        )\n      }\n      return\n    }\n\n    if (\n      image.layout !== defaultImage.layout &&\n      process.env.NODE_ENV === `development`\n    ) {\n      console.warn(\n        `[gatsby-plugin-image] Mismatched image layout: expected \"${defaultImage.layout}\" but received \"${image.layout}\". All art-directed images use the same layout as the default image`\n      )\n    }\n\n    output.images.sources.push(\n      ...image.images.sources.map(source => {\n        return { ...source, media }\n      }),\n      {\n        media,\n        srcSet: image.images.fallback.srcSet,\n      }\n    )\n\n    if (!output.placeholder) {\n      return\n    }\n","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-image/src/components/hooks.ts#L357-L393","documentation":"Error \"[gatsby-plugin-image] Mismatched image layout: expected \"${defaultImage.layout}\" but received \"${image.layout}\". All art-directed images use the same layout as the default image\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby-plugin-image/src/components/hooks.ts:375 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Generate art-directed images with the same layout as the default image (e.g. all constrained)","Adjust the default image's layout to match the art-directed ones"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}