{"record":{"id":"183027ceabed4a35","repo":"gatsbyjs/gatsby","slug":"invalid-duotone-option-specified-for-file-absolu","errorCode":null,"errorMessage":"Invalid duotone option specified for ${file.absolutePath}, ignoring. Please pass an object to duotone with the keys \"highlight\" and \"shadow\" set to the corresponding hex values you want to use.","messagePattern":"Invalid duotone option specified for (.+?), ignoring\\. Please pass an object to duotone with the keys \"highlight\" and \"shadow\" set to the corresponding hex values you want to use\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-sharp/src/image-data.ts","lineNumber":166,"sourceCode":"\n  if (placeholder === `tracedSVG`) {\n    if (!didShowTraceSVGRemovalWarning) {\n      console.warn(\n        `\"TRACED_SVG\" placeholder argument value is no longer supported (used in gatsbyImageData processing), falling back to \"DOMINANT_COLOR\". See https://gatsby.dev/tracesvg-removal/`\n      )\n      didShowTraceSVGRemovalWarning = true\n    }\n    placeholder = `dominantColor`\n  }\n\n  const {\n    fit = `cover`,\n    cropFocus = sharp.strategy.attention,\n    duotone,\n  } = transformOptions\n\n  if (duotone && (!duotone.highlight || !duotone.shadow)) {\n    reporter.warn(\n      `Invalid duotone option specified for ${file.absolutePath}, ignoring. Please pass an object to duotone with the keys \"highlight\" and \"shadow\" set to the corresponding hex values you want to use.`\n    )\n  }\n\n  const metadata = await getImageMetadata(\n    file,\n    placeholder === `dominantColor`,\n    cache\n  )\n\n  if ((args.width || args.height) && layout === `fullWidth`) {\n    reporter.warn(\n      `Specifying fullWidth images will ignore the width and height arguments, you may want a constrained image instead. Otherwise, use the breakpoints argument.`\n    )\n    args.width = metadata?.width\n    args.height = undefined\n  }\n","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-sharp/src/image-data.ts#L148-L184","documentation":"Error \"Invalid duotone option specified for ${file.absolutePath}, ignoring. Please pass an object to duotone with the keys \"highlight\" and \"shadow\" set to the corresponding hex values you want to use.\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby-plugin-sharp/src/image-data.ts:166 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass duotone as an object with both keys set to hex colors: { highlight: \"#hex\", shadow: \"#hex\" }"],"exampleFix":null,"handlingStrategy":"fallback","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"}