{"record":{"id":"4a0b148bade287a2","repo":"gatsbyjs/gatsby","slug":"chalk-bold-loading-is-an-invalid-value-for-the","errorCode":null,"errorMessage":"${chalk.bold(loading)} is an invalid value for the ${chalk.bold(`loading`)} option. Please pass one of \"lazy\", \"eager\" or \"auto\".","messagePattern":"(.+?) is an invalid value for the (.+?) option\\. Please pass one of \"lazy\", \"eager\" or \"auto\"\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-remark-images-contentful/src/index.js","lineNumber":123,"sourceCode":"      },\n      reporter\n    )\n\n    // Calculate the paddingBottom %\n    const ratio = `${(1 / responsiveSizesResult.aspectRatio) * 100}%`\n\n    const fallbackSrc = originalImg\n    const srcSet = responsiveSizesResult.srcSet\n    const presentationWidth = responsiveSizesResult.presentationWidth\n\n    // Generate default alt tag\n    const fileNameNoExt = fileName.replace(/\\.[^/.]+$/, ``)\n    const defaultAlt = fileNameNoExt.replace(/[^A-Z0-9]/gi, ` `)\n\n    const loading = options.loading\n\n    if (![`lazy`, `eager`, `auto`].includes(loading)) {\n      reporter.warn(\n        reporter.stripIndent(`\n        ${chalk.bold(loading)} is an invalid value for the ${chalk.bold(\n          `loading`\n        )} option. Please pass one of \"lazy\", \"eager\" or \"auto\".\n      `)\n      )\n    }\n\n    // Create our base image tag\n    let imageTag = `\n      <img\n        class=\"gatsby-resp-image-image\"\n        style=\"width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px ${\n          options.backgroundColor\n        };\"\n        alt=\"${node.alt ? node.alt : defaultAlt}\"\n        title=\"${node.title ? node.title : ``}\"\n        src=\"${fallbackSrc}\"","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-remark-images-contentful/src/index.js#L105-L141","documentation":"Option-validation warning while generating markup for a Contentful image node: the `loading` option value is not one of 'lazy', 'eager' or 'auto'. The generated <img> still uses the invalid value (browsers default to 'auto'-like behavior), but the warning tells you to correct the gatsby-remark-images-contentful plugin option.","triggerScenarios":"Thrown at packages/gatsby-remark-images-contentful/src/index.js:123 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set loading to \"lazy\", \"eager\" or \"auto\" in plugin options"],"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-14T00:17:10.932Z"}