{"record":{"id":"f851d78b6e18b195","repo":"gatsbyjs/gatsby","slug":"gatsby-plugin-image-could-not-find-values-for-th","errorCode":null,"errorMessage":"[gatsby-plugin-image] Could not find values for the following props at build time: ${unresolvedProps.join(`, `)}","messagePattern":"\\[gatsby-plugin-image\\] Could not find values for the following props at build time: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-image/src/babel-plugin-parse-static-images.ts","lineNumber":49,"sourceCode":"            .referencesImport(`gatsby-plugin-image`, `StaticImage`)\n        ) {\n          return\n        }\n\n        const unresolvedProps: Array<string> = []\n\n        const props = evaluateImageAttributes(nodePath, prop => {\n          unresolvedProps.push(prop)\n        })\n\n        let error\n\n        if (unresolvedProps.length) {\n          // TODO: Add a shortlink to docs on the plugin\n          error = `Could not find values for the following props at build time: ${unresolvedProps.join(\n            `, `\n          )}`\n          console.warn(`[gatsby-plugin-image] ${error}`)\n        }\n\n        // Adding the filename to the hashing, like in \"extractStaticImageProps\" function\n        if (state.filename) {\n          props.filename = slash(state.filename)\n        }\n        const hash = hashOptions(props)\n\n        const cacheDir = (this.opts as Record<string, string>)?.cacheDir\n\n        if (!cacheDir) {\n          console.warn(\n            `[gatsby-plugin-image] Couldn't find image data cache file`\n          )\n        }\n\n        const filename = path.join(cacheDir, `${hash}.json`)\n        let data: Record<string, unknown> | undefined","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-image/src/babel-plugin-parse-static-images.ts#L31-L67","documentation":"Babel-macro-time warning from the StaticImage plugin: evaluateImageAttributes could not statically resolve the listed props because they are dynamic expressions or variables. StaticImage requires literal prop values so images can be located and processed at build time.","triggerScenarios":"Thrown at packages/gatsby-plugin-image/src/babel-plugin-parse-static-images.ts:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the listed props as static string/number literals directly in the StaticImage JSX","Do not compute props from variables, function calls or template expressions"],"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"}