{"record":{"id":"8dbd6528acb4cdc5","repo":"gatsbyjs/gatsby","slug":"gatsby-plugin-image-no-data-found-for-image-p","errorCode":null,"errorMessage":"[gatsby-plugin-image] No data found for image \"${props.src}\"","messagePattern":"\\[gatsby-plugin-image\\] No data found for image \"(.+?)\"","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-image/src/babel-plugin-parse-static-images.ts","lineNumber":85,"sourceCode":"        let data: Record<string, unknown> | undefined\n\n        // If there's no src prop there's no point in checking if it exists\n        if (!unresolvedProps.includes(`src`)) {\n          try {\n            data = fs.readJSONSync(filename)\n          } catch (e) {\n            // TODO add info about minimum Gatsby version once this is merged\n            const msg = stripIndent`\n            Could not read image data file \"${filename}\". \n            This may mean that the images in \"${this.filename}\" were not processed.\n            Please ensure that your gatsby version is at least 2.24.78.`\n            error += msg\n            console.warn(`[gatsby-plugin-image] ${msg}`)\n          }\n        }\n\n        if (!data) {\n          console.warn(\n            `[gatsby-plugin-image] No data found for image \"${props.src}\"`\n          )\n\n          // Add the error message to the component so we can show it in the browser\n          const newProp = t.jsxAttribute(\n            t.jsxIdentifier(`__error`),\n\n            t.jsxExpressionContainer(\n              t.stringLiteral(`No data found for image \"${props.src}\"\n              ${error || ``}`)\n            )\n          )\n          nodePath.node.attributes.push(newProp)\n          return\n        }\n        if (error) {\n          // Add the error message to the component so we can show it in the browser\n","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-image/src/babel-plugin-parse-static-images.ts#L67-L103","documentation":"Babel-transform guard in gatsby-plugin-image's static-image parser: the image data JSON file produced during build could not be read for the <StaticImage src=\"...\"> being compiled. This sentinel warning (with a follow-up error about the data file) means the build did not process that component's images — typically on Gatsby versions older than 2.24.78 — and the src prop will fail to resolve at runtime.","triggerScenarios":"Thrown at packages/gatsby-plugin-image/src/babel-plugin-parse-static-images.ts:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the src path is correct and points at a real image","Rebuild with a clean cache so image data is regenerated"],"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"}