{"record":{"id":"1fca435f30d9a32a","repo":"gatsbyjs/gatsby","slug":"gatsby-plugin-image-generateimagedata-was-not","errorCode":null,"errorMessage":"[gatsby-plugin-image] \"generateImageData\" was not passed a plugin name","messagePattern":"\\[gatsby-plugin-image\\] \"generateImageData\" was not passed a plugin name","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-image/src/image-utils.ts","lineNumber":239,"sourceCode":"  args = setDefaultDimensions(args)\n\n  let {\n    pluginName,\n    sourceMetadata,\n    generateImageSource,\n    layout,\n    fit,\n    options,\n    width,\n    height,\n    filename,\n    reporter = { warn },\n    backgroundColor,\n    placeholderURL,\n  } = args\n\n  if (!pluginName) {\n    reporter.warn(\n      `[gatsby-plugin-image] \"generateImageData\" was not passed a plugin name`\n    )\n  }\n\n  if (typeof generateImageSource !== `function`) {\n    throw new Error(`generateImageSource must be a function`)\n  }\n\n  if (!sourceMetadata || (!sourceMetadata.width && !sourceMetadata.height)) {\n    // No metadata means we let the CDN handle max size etc, aspect ratio etc\n    sourceMetadata = {\n      width,\n      height,\n      format: sourceMetadata?.format || formatFromFilename(filename) || `auto`,\n    }\n  } else if (!sourceMetadata.format) {\n    sourceMetadata.format = formatFromFilename(filename)\n  }","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-image/src/image-utils.ts#L221-L257","documentation":"API-contract guard inside generateImageData: the `pluginName` argument is falsy. It is only used to prefix warnings, so generation proceeds, but subsequent warnings will lack the plugin identifier that tells you which source plugin produced the bad image. Called by source plugins wrapping gatsby-plugin-sharp/gatsby-plugin-image internals.","triggerScenarios":"Thrown at packages/gatsby-plugin-image/src/image-utils.ts:239 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass pluginName (the calling plugin's name) in the generateImageData args"],"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"}