{"record":{"id":"be7cbfd27b805a72","repo":"gatsbyjs/gatsby","slug":"gatsby-plugin-image-all-art-directed-images-pass","errorCode":null,"errorMessage":"[gatsby-plugin-image] All art-directed images passed to must have a value set for `media`. Skipping.","messagePattern":"\\[gatsby-plugin-image\\] All art-directed images passed to must have a value set for `media`\\. Skipping\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-image/src/components/hooks.ts","lineNumber":364,"sourceCode":"  artDirected: Array<IArtDirectedImage>\n): IGatsbyImageData {\n  const { images, placeholder, ...props } = defaultImage\n  const output: IGatsbyImageData = {\n    ...props,\n    images: {\n      ...images,\n      sources: [],\n    },\n    placeholder: placeholder && {\n      ...placeholder,\n      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 }","sourceCodeStart":346,"sourceCodeEnd":382,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-image/src/components/hooks.ts#L346-L382","documentation":"Dev warning from withArtDirection: an entry in the artDirected array lacks a `media` prop, so without a media query it can never match a viewport — the entry is skipped and omitted from the generated <source> elements.","triggerScenarios":"Thrown at packages/gatsby-plugin-image/src/components/hooks.ts:364 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set a media query string on every art-directed image, e.g. media=\"(min-width: 800px)\""],"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"}