gatsbyjs/gatsby · error
The requested ${fixedDimension} "${options
Error message
The requested ${fixedDimension} "${options[fixedDimension]}px" for a resolutions field for
the file ${file.absolutePath}
was larger than the actual image ${fixedDimension} of ${dimensions[fixedDimension]}px!
If possible, replace the current image with a larger one.
What it means
Error " The requested ${fixedDimension} "${options[fixedDimension]}px" for a resolutions field for the file ${file.absolutePath} was larger than the actual image ${fixedDimension} of ${dimensions[fixedDimension]}px! If possible, replace the current image with a larger one. " thrown in gatsbyjs/gatsby.
Source
Thrown at packages/gatsby-plugin-sharp/src/index.js:657
const options = healOptions(getPluginOptions(), args, file.extension)
// if no width is passed, we need to resize the image based on the passed height
const fixedDimension = options.width === undefined ? `height` : `width`
// Create sizes for different resolutions — we do 1x, 1.5x, and 2x.
const sizes = []
sizes.push(options[fixedDimension])
sizes.push(options[fixedDimension] * 1.5)
sizes.push(options[fixedDimension] * 2)
const dimensions = await getImageSizeAsync(file)
const filteredSizes = sizes.filter(size => size <= dimensions[fixedDimension])
// If there's no fluid images after filtering (e.g. image is smaller than what's
// requested, add back the original so there's at least something)
if (filteredSizes.length === 0) {
filteredSizes.push(dimensions[fixedDimension])
console.warn(
`
The requested ${fixedDimension} "${options[fixedDimension]}px" for a resolutions field for
the file ${file.absolutePath}
was larger than the actual image ${fixedDimension} of ${dimensions[fixedDimension]}px!
If possible, replace the current image with a larger one.
`
)
}
// Sort images for prettiness.
const transforms = _.sortBy(filteredSizes).map(size => {
const arrrgs = createTransformObject(options)
arrrgs[fixedDimension] = Math.round(size)
// Queue images for processing.
if (options.width !== undefined && options.height !== undefined) {
arrrgs.height = Math.round(size * (options.height / options.width))
}View on GitHub (pinned to e85d62f177)
Solutions
- Use a larger source image
- Request smaller resolutions for the fixed image
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/gatsby-plugin-sharp/src/index.js:657 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/16c6dc7b64ce962d.
Report an issue: GitHub.