Skip to main content
warning

Experimental feature - expect bugs and breaking changes at any time.
Track progress on GitHub and discuss in the #web-renderer channel on Discord.

HTML in Canvasv4.0.447

On supported Chromium-based browsers, @remotion/web-renderer can optionally capture full frames using the experimental HTML-in-Canvas APIs.

Enabling the option does not guarantee that this path runs. If the browser does not have HTML in Canvas enabled, it falls back to the default frame capturing mechanism.

Enabling

In code

Pass allowHtmlInCanvas: true to renderMediaOnWeb() or renderStillOnWeb(). The default is false when you omit the field.

Example
await renderStillOnWeb({ composition, frame: 0, imageFormat: 'png', inputProps: {}, allowHtmlInCanvas: true, });

In the Studio

With client-side rendering enabled, open the render modal, go to the Other tab, and turn on Allow HTML-in-Canvas. The initial value comes from your config and CLI defaults (below).

As the Studio default

In remotion.config.ts:

remotion.config.ts
Config.setAllowHtmlInCanvasEnabled(true);

Or start Studio with the CLI flag (it overrides the config file for this value):

npx remotion studio --allow-html-in-canvas

See setAllowHtmlInCanvasEnabled() and npx remotion studio for details. The flag description is also available as:

When client-side rendering is enabled in the Studio, allow the experimental Chromium HTML-in-Canvas path (drawElementImage) for capturing frames instead of the built-in DOM composer. See Web Renderer docs.

Check if HTML in Canvas was used

If HTML in Canvas was used, you will see a warning in the browser console:

Using Chromium experimental HTML-in-Canvas (drawElementImage) for this frame. Pixels may differ from the built-in DOM composer. Set allowHtmlInCanvas: false to force software rasterization. See https://github.com/WICG/html-in-canvas

If HTML-in-Canvas is available, and allowed, but not used, a warning will be printed:

Not using html-in-canvas: drawElementImage is available but canvas.requestPaint() is missing. Use a Chromium version that ships requestPaint.

This can happen for example if enabling the feature in Chrome rather than Chrome Canary (as of time of writing in April 2026).

If HTML-in-Canvas is not available, or not allowed, no warning will be printed.

Compatibility

BrowsersEnvironments
Chrome
Firefox
Safari

HTML-in-Canvas depends on Chromium flag chrome://flags/#canvas-draw-element which needs to be explicitly enabled as of time of writing in April 2026.

See also