{"record":{"id":"817be7d1490a276b","repo":"gatsbyjs/gatsby","slug":"pluginname-the-resolver-for-image-filename","errorCode":null,"errorMessage":"[${pluginName}] The resolver for image ${filename} returned an invalid value.","messagePattern":"\\[(.+?)\\] The resolver for image (.+?) returned an invalid value\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-image/src/image-utils.ts","lineNumber":306,"sourceCode":"\n  formats.forEach(format => {\n    const images = imageSizes.sizes\n      .map(size => {\n        const imageSrc = generateImageSource(\n          filename,\n          size,\n          Math.round(size / imageSizes.aspectRatio),\n          format,\n          fit,\n          options\n        )\n        if (\n          !imageSrc?.width ||\n          !imageSrc.height ||\n          !imageSrc.src ||\n          !imageSrc.format\n        ) {\n          reporter.warn(\n            `[${pluginName}] The resolver for image ${filename} returned an invalid value.`\n          )\n          return undefined\n        }\n        return imageSrc\n      })\n      .filter(Boolean)\n\n    if (format === `jpg` || format === `png` || format === `auto`) {\n      const unscaled =\n        images.find(img => img.width === imageSizes.unscaledWidth) || images[0]\n\n      if (unscaled) {\n        result.fallback = {\n          src: unscaled.src,\n          srcSet: getSrcSet(images),\n          sizes,\n        }","sourceCodeStart":288,"sourceCodeEnd":324,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-image/src/image-utils.ts#L288-L324","documentation":"Per-size guard inside generateImageData: for the current format/size, the source plugin's generateImageSource callback returned an object missing width, height, src or format (or undefined). That size is dropped (undefined) from the generated srcSet; other sizes still build. It indicates a bug or unsupported input in the calling image source plugin.","triggerScenarios":"Thrown at packages/gatsby-plugin-image/src/image-utils.ts:306 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the source plugin's generateImageSource to return {src, width, height, format} for every requested size"],"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"}