gatsbyjs/gatsby · error

Could not process image ${path}

Error message

Could not process image ${path}

What it means

Runtime guard in gatsby-plugin-image's chokidar watcher: a file change event fired, but createImageNode returned falsy for the changed path (e.g. the file could not be read or was an unsupported type), so the changed image is not rebuilt and a warning names the path.

Source

Thrown at packages/gatsby-plugin-image/src/node-apis/watcher.ts:38

  pathPrefix: string
  createNodeId: ParentSpanPluginArgs["createNodeId"]
  createNode: Actions["createNode"]
  cache: GatsbyCache
  reporter: Reporter
}): void {
  // We use a shared watcher, but only create it if needed
  if (!watcher) {
    watcher = chokidar.watch(fullPath)
    watcher.on(`change`, async (path: string): Promise<void> => {
      reporter.verbose(`Image changed: ${path}`)
      const node = await createImageNode({
        fullPath: path,
        createNodeId,
        createNode,
        reporter,
      })
      if (!node) {
        reporter.warn(`Could not process image ${path}`)
        return
      }
      await updateImages({ node, cache, pathPrefix, reporter })
    })
  } else {
    // If we already have a watcher, just add this image to it
    watcher.add(fullPath)
  }
}
/**
 * Update any static image instances that use a source image
 */
async function updateImages({
  cache,
  node,
  pathPrefix,
  reporter,
}: {

View on GitHub (pinned to e85d62f177)

Solutions

  1. Verify the changed file is a readable, supported image
  2. Re-save the file to retrigger the watcher
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/gatsby-plugin-image/src/node-apis/watcher.ts:38 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26). Data as JSON: /api/errors/8e0a55d547a3e015. Report an issue: GitHub.