{"record":{"id":"4d3860156986a0ac","repo":"gatsbyjs/gatsby","slug":"the-requested-invaliddimension-invalidd","errorCode":null,"errorMessage":"\n    The requested ${invalidDimension} \"${invalidDimension === `width` ? width : height}px\" for the image ${sourceMetadata.filename} was larger than the actual image ${invalidDimension} of ${sourceMetadata[invalidDimension]}px. If possible, replace the current image with a larger one.","messagePattern":"\n    The requested (.+?) \"(.+?)px\" for the image (.+?) was larger than the actual image (.+?) of (.+?)px\\. If possible, replace the current image with a larger one\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-utils/src/polyfill-remote-file/graphql/gatsby-image-resolver.ts","lineNumber":517,"sourceCode":"    aspectRatio = calculated.aspectRatio\n  } else {\n    // if we only get one value calculate the other value based on aspectRatio\n    if (!width) {\n      width = Math.round((height as number) * aspectRatio)\n    } else {\n      height = Math.round(width / aspectRatio)\n    }\n  }\n\n  const presentationWidth = width // will use this for presentationWidth, don't want to lose it\n  const isRequestedSizeLargerThanOriginal =\n    sourceMetadata.width < width || sourceMetadata.height < (height as number)\n\n  // If the image is smaller than requested, warn the user that it's being processed as such\n  // print out this message with the necessary information before we overwrite it for sizing\n  if (isRequestedSizeLargerThanOriginal) {\n    const invalidDimension = sourceMetadata.width < width ? `width` : `height`\n    console.warn(`\n    The requested ${invalidDimension} \"${\n      invalidDimension === `width` ? width : height\n    }px\" for the image ${\n      sourceMetadata.filename\n    } was larger than the actual image ${invalidDimension} of ${\n      sourceMetadata[invalidDimension]\n    }px. If possible, replace the current image with a larger one.`)\n\n    if (invalidDimension === `width`) {\n      width = sourceMetadata.width\n      height = width / aspectRatio\n    } else {\n      height = sourceMetadata.height\n      width = height * aspectRatio\n    }\n  }\n\n  const sizes = new Set<number>()","sourceCodeStart":499,"sourceCodeEnd":535,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-utils/src/polyfill-remote-file/graphql/gatsby-image-resolver.ts#L499-L535","documentation":"Error \"\n    The requested ${invalidDimension} \"${invalidDimension === `width` ? width : height}px\" for the image ${sourceMetadata.filename} was larger than the actual image ${invalidDimension} of ${sourceMetadata[invalidDimension]}px. If possible, replace the current image with a larger one.\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby-plugin-utils/src/polyfill-remote-file/graphql/gatsby-image-resolver.ts:517 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply a higher-resolution source image","Request smaller dimensions for the fixed remote image"],"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"}