gatsbyjs/gatsby · error
GatsbyPluginMissing
GatsbyPluginMissing
Error message
gatsby-plugin-image is missing from your project. Please install "gatsby-plugin-image".
What it means
Error "gatsby-plugin-image is missing from your project. Please install "gatsby-plugin-image"." thrown in gatsbyjs/gatsby.
Source
Thrown at packages/gatsby-source-contentful/src/gatsby-node.js:54
pluginOptions.accessToken
)}". Make sure to double check them!`
throw new Error(errorMessage)
}
})
return undefined
}
export const onPreInit = async (
{ store, reporter, actions },
pluginOptions
) => {
// if gatsby-plugin-image is not installed
try {
await import(`gatsby-plugin-image/graphql-utils`)
} catch (err) {
reporter.panic({
id: CODES.GatsbyPluginMissing,
context: {
sourceMessage: `gatsby-plugin-image is missing from your project.\nPlease install "gatsby-plugin-image".`,
},
})
}
// if gatsby-plugin-image is not configured
if (
!store
.getState()
.flattenedPlugins.find(plugin => plugin.name === `gatsby-plugin-image`)
) {
reporter.panic({
id: CODES.GatsbyPluginMissing,
context: {
sourceMessage: `gatsby-plugin-image is missing from your gatsby-config file.\nPlease add "gatsby-plugin-image" to your plugins array.`,
},View on GitHub (pinned to 8b06340921)
Solutions
- Install the missing package: npm install gatsby-plugin-image (or yarn add gatsby-plugin-image).
- Add "gatsby-plugin-image" to the plugins array in gatsby-config.js.
When it happens
Trigger: Thrown at packages/gatsby-source-contentful/src/gatsby-node.js:54 when the library encounters an invalid state.
Common situations: Occurs when gatsby-source-contentful is used without gatsby-plugin-image installed. Run `npm install gatsby-plugin-image` and add it to the plugins array in gatsby-config.js.
AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13).
Data as JSON: /api/errors/ce1394c727d1bfe4.
Report an issue: GitHub.