{"record":{"id":"f937dfc4aaaee060","repo":"gatsbyjs/gatsby","slug":"specifying-fullwidth-images-will-ignore-the-width","errorCode":null,"errorMessage":"Specifying fullWidth images will ignore the width and height arguments, you may want a constrained image instead. Otherwise, use the breakpoints argument.","messagePattern":"Specifying fullWidth images will ignore the width and height arguments, you may want a constrained image instead\\. Otherwise, use the breakpoints argument\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-sharp/src/image-data.ts","lineNumber":178,"sourceCode":"    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\n  if (!args.width && !args.height && metadata.width) {\n    args.width = metadata.width\n  }\n\n  if (args.aspectRatio) {\n    if (args.width && args.height) {\n      reporter.warn(\n        `Specifying aspectRatio along with both width and height will cause aspectRatio to be ignored.`\n      )\n    } else if (args.width) {\n      args.height = args.width / args.aspectRatio\n    } else if (args.height) {","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-sharp/src/image-data.ts#L160-L196","documentation":"generateImageData warning: width/height were passed together with a fullWidth layout, whose sizes derive from breakpoints instead; the passed width is overwritten with the source width and height cleared, so the user values have no effect.","triggerScenarios":"Thrown at packages/gatsby-plugin-sharp/src/image-data.ts:178 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use layout \"constrained\" or \"fixed\" when you need explicit dimensions","For fullWidth, control sizes via the breakpoints argument instead"],"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-14T05:17:10.506Z"}