gatsbyjs/gatsby · error
Please ensure that "gatsby-plugin-image" is included in the
Error message
Please ensure that "gatsby-plugin-image" is included in the plugins array in gatsby-config.js, and that your version of gatsby is at least 2.24.78
What it means
Guard in _getStaticImage (SSR): imageData could not be resolved and no __error was provided, so the component falls back to warning that the plugin is not set up correctly. It fires when gatsby-plugin-image is missing from gatsby-config or the installed gatsby version predates the required 2.24.78, so StaticImage's server handler cannot resolve image data.
Source
Thrown at packages/gatsby-plugin-image/src/components/static-image.server.tsx:59
pngOptions,
webpOptions,
avifOptions,
blurredOptions,
breakpoints,
outputPixelDensities,
/* eslint-enable @typescript-eslint/no-unused-vars */
...props
}): ReactElement {
if (__error) {
console.warn(__error)
}
if (imageData) {
return <GatsbyImage image={imageData} {...props} />
}
console.warn(`Image not loaded`, src)
if (!__error && process.env.NODE_ENV === `development`) {
console.warn(
`Please ensure that "gatsby-plugin-image" is included in the plugins array in gatsby-config.js, and that your version of gatsby is at least 2.24.78`
)
}
return null
}
}
const StaticImage: React.FC<IStaticImageProps & IPrivateProps> =
_getStaticImage(GatsbyImageServer)
const checkDimensionProps: PropTypes.Validator<number> = (
props: IStaticImageProps & IPrivateProps,
propName: keyof IStaticImageProps & IPrivateProps,
...rest
) => {
if (
props.layout === `fullWidth` &&
(propName === `width` || propName === `height`) &&View on GitHub (pinned to e85d62f177)
Solutions
- Add "gatsby-plugin-image" to the plugins array in gatsby-config.js
- Upgrade gatsby to at least version 2.24.78
- Check the accompanying "Image not loaded" console output for the specific src that failed
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/gatsby-plugin-image/src/components/static-image.server.tsx:59 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/e5a86cd4ddf698b9.
Report an issue: GitHub.