{"record":{"id":"71495bd5b90fdf9e","repo":"gatsbyjs/gatsby","slug":"image-file-relativepath-specified-only-avif-for","errorCode":null,"errorMessage":"Image ${file.relativePath} specified only AVIF format, with no fallback format. This will mean your site cannot be viewed in all browsers.","messagePattern":"Image (.+?) specified only AVIF format, with no fallback format\\. This will mean your site cannot be viewed in all browsers\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-sharp/src/image-data.ts","lineNumber":221,"sourceCode":"\n  if (formats.has(`jpg`) && formats.has(`png`)) {\n    reporter.warn(\n      `Specifying both \"jpg\" and \"png\" formats is not supported and will be ignored. Please use \"auto\" instead.`\n    )\n    useAuto = true\n  }\n\n  let primaryFormat: ImageFormat | undefined\n  if (useAuto) {\n    primaryFormat = normalizeFormat(metadata?.format || file.extension)\n  } else if (formats.has(`png`)) {\n    primaryFormat = `png`\n  } else if (formats.has(`jpg`)) {\n    primaryFormat = `jpg`\n  } else if (formats.has(`webp`)) {\n    primaryFormat = `webp`\n  } else if (formats.has(`avif`)) {\n    reporter.warn(\n      `Image ${file.relativePath} specified only AVIF format, with no fallback format. This will mean your site cannot be viewed in all browsers.`\n    )\n    primaryFormat = `avif`\n  }\n\n  const optionsMap = {\n    jpg: args.jpgOptions,\n    png: args.pngOptions,\n    webp: args.webpOptions,\n    avif: args.avifOptions,\n  }\n\n  const options = primaryFormat ? optionsMap[primaryFormat] : undefined\n\n  const imageSizes: {\n    sizes: Array<number>\n    presentationWidth: number\n    presentationHeight: number","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-sharp/src/image-data.ts#L203-L239","documentation":"Browser-compatibility warning inside generateImageData (gatsby-plugin-sharp): after format selection, only 'avif' remains (no jpg/png/webp fallback). AVIF is unsupported in older browsers and Safari versions, so users on those browsers will get a broken image unless a fallback format is added. The warning names file.relativePath.","triggerScenarios":"Thrown at packages/gatsby-plugin-sharp/src/image-data.ts:221 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a fallback format (e.g. \"auto\", jpg, png or webp) alongside avif in the formats array"],"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"}