gatsbyjs/gatsby · error
${chalk.bold(decoding)} is an invalid value for the ${chalk.
Error message
${chalk.bold(decoding)} is an invalid value for the ${chalk.bold(`decoding`)} option. Please pass one of "async", "sync" or "auto". What it means
Option-validation warning while generating markup for a markdown image node: the plugin's `decoding` option value is not one of 'async', 'sync' or 'auto'. Markup is still generated with the invalid value; the warning tells you to fix the gatsby-remark-images plugin option.
Source
Thrown at packages/gatsby-remark-images/src/index.js:246
const title = node.title ? _.escape(node.title) : ``
const loading = options.loading
if (![`lazy`, `eager`, `auto`].includes(loading)) {
reporter.warn(
reporter.stripIndent(`
${chalk.bold(loading)} is an invalid value for the ${chalk.bold(
`loading`
)} option. Please pass one of "lazy", "eager" or "auto".
`)
)
}
const decoding = options.decoding
if (![`async`, `sync`, `auto`].includes(decoding)) {
reporter.warn(
reporter.stripIndent(`
${chalk.bold(decoding)} is an invalid value for the ${chalk.bold(
`decoding`
)} option. Please pass one of "async", "sync" or "auto".
`)
)
}
const imageStyle = `
width: 100%;
height: 100%;
margin: 0;
vertical-align: middle;
position: absolute;
top: 0;
left: 0;`.replace(/\s*(\S+:)\s*/g, `$1`)
// Create our base image tagView on GitHub (pinned to e85d62f177)
Solutions
- Set decoding to "async", "sync" or "auto" in plugin options
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/gatsby-remark-images/src/index.js:246 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/d6a104877b8e815c.
Report an issue: GitHub.