{"record":{"id":"15cc6f96b8de6e98","repo":"gatsbyjs/gatsby","slug":"could-not-create-node-for-image-src","errorCode":null,"errorMessage":"Could not create node for image ${src}","messagePattern":"Could not create node for image (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-image/src/node-apis/image-processing.ts","lineNumber":145,"sourceCode":"          reporter.warn(\n            `Could not find image \"${src}\" in \"${filename}\". Looked for ${fullPath}.`\n          )\n          return\n        }\n\n        try {\n          const {\n            createFileNode,\n          } = require(`gatsby-source-filesystem/create-file-node`)\n\n          file = await createFileNode(fullPath, createNodeId, {})\n        } catch (e) {\n          reporter.panic(`Please install gatsby-source-filesystem`)\n        }\n      }\n\n      if (!file) {\n        reporter.warn(`Could not create node for image ${src}`)\n        return\n      }\n\n      // We need our own type, because `File` belongs to the filesystem plugin\n      file.internal.type = `StaticImage`\n      delete (file.internal as any).owner\n      createNode(file)\n\n      const cacheKey = `ref-${file.id}`\n\n      // This is a cache of file node to static image mappings\n      const imageRefs: Map<string, IImageMetadata> =\n        (await cache.get(cacheKey)) || {}\n\n      // Different cache: this is the one with the image properties\n      const cacheFilename = path.join(cacheDir, `${hash}.json`)\n      imageRefs[hash] = {\n        contentDigest: file.internal?.contentDigest,","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-image/src/node-apis/image-processing.ts#L127-L163","documentation":"Guard in gatsby-plugin-image's node API: after resolving the file (and possibly creating a file node via gatsby-source-filesystem's createFileNode), `file` is still falsy, so the image cannot be processed and is skipped with a warning.","triggerScenarios":"Thrown at packages/gatsby-plugin-image/src/node-apis/image-processing.ts:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the file is readable and a valid image","Ensure gatsby-source-filesystem is installed"],"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-14T05:17:10.506Z"}