{"record":{"id":"a0e94e05cdcf95cd","repo":"remotion-dev/remotion","slug":"your-browser-does-not-support-the-webcodecs-imaged","errorCode":null,"errorMessage":"Your browser does not support the WebCodecs ImageDecoder API.","messagePattern":"Your browser does not support the WebCodecs ImageDecoder API\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/animated-image/create-image-decoder.ts","lineNumber":13,"sourceCode":"export const createImageDecoder = async ({\n\tresolvedSrc,\n\tsignal,\n\trequestInit,\n\tcontentType,\n}: {\n\tresolvedSrc: string;\n\tsignal: AbortSignal;\n\trequestInit?: RequestInit;\n\tcontentType: string | null;\n}) => {\n\tif (typeof ImageDecoder === 'undefined') {\n\t\tthrow new Error(\n\t\t\t'Your browser does not support the WebCodecs ImageDecoder API.',\n\t\t);\n\t}\n\n\tconst response = await fetch(resolvedSrc, {...requestInit, signal});\n\tconst {body} = response;\n\tif (!body) {\n\t\tthrow new Error('Got no body');\n\t}\n\n\tconst decoder = new ImageDecoder({\n\t\tdata: body,\n\t\ttype: contentType ?? response.headers.get('Content-Type') ?? 'image/gif',\n\t});\n\tawait Promise.all([decoder.completed, decoder.tracks.ready]);\n\n\tconst {selectedTrack} = decoder.tracks;\n\tif (!selectedTrack) {","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/animated-image/create-image-decoder.ts#L1-L31","documentation":"Thrown when the WebCodecs ImageDecoder global is undefined. Remotion's animated image decoding (GIF/animated WebP/AVIF) relies on this API; if the browser lacks it, decoding cannot proceed.","triggerScenarios":"Rendering an animated image in a browser or environment (older Safari, headless browsers without WebCodecs) where ImageDecoder is not implemented.","commonSituations":"Old browser versions, locked-down enterprise browsers, some testing/headless setups, or running in Node without a WebCodecs polyfill.","solutions":["Use a modern browser that supports WebCodecs ImageDecoder (recent Chrome/Edge; check caniuse).","For rendering, use Remotion's Chromium-based headless renderer which bundles WebCodecs support.","Detect support and fall back to a static image or non-animated format."],"exampleFix":"// before\nimport animatedGif from './flag.gif';\n<Img src={animatedGif} />;\n\n// after\nimport animatedGif from './flag.gif';\nimport staticFrame from './flag-static.png';\nconst src = typeof ImageDecoder === 'undefined' ? staticFrame : animatedGif;\n<Img src={src} />;","handlingStrategy":"type-guard","validationCode":"const supportsImageDecoder = typeof ImageDecoder !== 'undefined';\nconst src = supportsImageDecoder ? animatedSrc : staticFallbackSrc;","typeGuard":"const supportsAnimatedImage = (): boolean =>\n  typeof ImageDecoder !== 'undefined';","tryCatchPattern":null,"preventionTips":["Feature-detect ImageDecoder before relying on animated images.","Provide static fallbacks for older browsers."],"tags":["webcodecs","image-decoder","browser-support","animated-image"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}