Iframes, Video, and Canvas: What Cannot Be Imported Into Figma and Why

Iframes hold another document, canvas is script-drawn pixels, video frames are not markup. Why each resists import into Figma, and what to do.

REFERENCEDESIGNERPublished

Why these three elements resist import

An iframe, a canvas and a video each show something on screen that is not described by the page's own layout markup. An iframe holds a second document. A canvas holds pixels that a script drew. A video holds frames that a player decodes while it plays. A tool that turns markup and styles into Figma layers has nothing to work with here. Expect a gap, a flat image, or a poster frame instead of live content.

This article explains the reason for each one, using what MDN and Figma document. UnHTML's public page does not state how it treats iframe, video or canvas elements, so this piece makes no claim about that. Your import report is the record of what happened to your page.

Iframes: a second document inside the first

An iframe is not a box of layout. According to MDN, the <iframe> element embeds another document, and each embedded document is a nested browsing context with its own document. The page you saved holds an <iframe> tag and a src URL. The content behind that URL is a different page.

Cross-origin content is out of reach

Scripts cannot access most properties of a window from a different origin, including a frame reaching its parent. The two sides talk through Window.postMessage() and nothing else. Which origins may embed a page at all is controlled by the frame-ancestors directive in a Content Security Policy, so some pages refuse to be framed.

For an import this means the host page and the frame are separate captures. Saving the host page does not save what the frame displays.

The one case where the markup is in the page

The srcdoc attribute carries inline HTML that overrides src. That is the exception: the embedded content sits in the attribute, so it is at least present in the file. Most embeds you meet (maps, video players, payment forms, ad slots) use src, and their content lives elsewhere.

Each iframe also costs the browser extra memory and resources, per MDN, so a page with several of them is heavy, not one clean layout.

Canvas: pixels with no structure

The canvas element is a bitmap that script draws on, using the 2D canvas API or WebGL. MDN is direct about the consequence: the element "is just a bitmap and does not provide information about any drawn objects", and drawn content is not part of the DOM.

That is the whole problem. A button built from <div> and CSS has a box, a fill, a radius and text you can map to Figma properties. A button drawn on a canvas has none of that. There are only pixels, and nothing in the markup says where one shape ends.

Figma says as much about its own capture. Its guide to turning coded screens into editable design layers warns that "complex scroll-driven or canvas-rendered sites may capture imperfectly", and that pages with heavy JavaScript animation, <canvas> rendering or virtualized lists may not translate cleanly.

Scripts add a second reason. UnHTML's public page says scripts, inline event handlers and javascript: URLs are stripped before rendering, and that a page built by JavaScript is re-rendered with scripts on only when you opt in to remote fetching, inside a sandboxed frame. A canvas whose picture only exists because a script ran has little to show in a saved file where that script never ran.

Video: markup you can read, frames you cannot

A video is the friendliest of the three. The video element can carry a poster attribute, an image shown while the video downloads, and one or more <source> elements pointing at files. Both are plain markup. The playing frames are not: they arrive from a file or a stream and a player decodes them.

Figma has a matching shape on its side. Per the Figma help on adding images and videos to designs, there is no specific layer type for images and videos. They are treated as fills. So a static poster image fits Figma naturally as an image fill, while a moving video does not become editable layers.

If your page is long and media-heavy, also read about layer caps and lazy images, since lazy-loaded media may not be present when the capture runs.

What to do instead

Four practical moves help, and none needs a special feature.

  1. Import the embedded page on its own. If the iframe shows a page you control or may use, capture that page separately and place it in your Figma file beside the host page.
  2. Export a frame yourself. For a canvas or video, take a screenshot or export a frame from the source, then drop it in as an image fill. It will be a picture, not editable shapes, and that is the honest outcome.
  3. Use the poster. For a video with a poster attribute, the poster image is the cleanest stand-in for the layout.
  4. Capture a section. Figma suggests trying element capture on the specific section instead of the whole page when a capture looks off.

Pages with clipped or masked media have their own limits, covered in support and fallbacks for masks and clip-path.

A quick reference

ElementWhat the markup holdsWhy it resists importStand-in that works
<iframe>A src URL (or srcdoc HTML)The content is a separate document with its own browsing contextCapture the embedded page separately
<canvas>A bitmap surface, no drawn objectsScript draws the pixels, and the DOM has no record of the shapesAn exported image used as a fill
<video>poster, <source> URLs, fallback textFrames come from a player, and Figma stores video as a fillThe poster image or an exported frame

Read the table by row. In each case the layout box exists, with a width and a height you can see, but the thing inside the box does not live in the markup. That is why the gap you see is a content gap, not a styling bug, and why fiddling with CSS before capture rarely helps.

Sizing the placeholder

Even when the content cannot come across, the box can. Note the rendered width and height of each iframe, canvas or video in the browser, then give your stand-in image the same size so the surrounding layout still reads correctly. That keeps spacing, alignment and the rest of the layout honest while you decide how to represent the missing piece.

Check the import report

Do not assume. UnHTML's public page describes an import report of every font substituted, frame reverted to absolute, and image skipped, and a node budget that guards against runaway dumps. Open the report after each import, find the section where the iframe, canvas or video sat, and look at what the file shows there. That is the evidence for your page, which no general article can supply.

Summary

Iframes, canvas and video resist import for a plain reason: what you see is not in the page's own layout markup. An iframe is a different document, a canvas is script-drawn pixels with no DOM, and a video's frames come from a player. Replace each with something Figma models well: a separate capture, an exported image, or a poster, and let the import report confirm what happened.

Frequently Asked Questions

Does an iframe import into Figma?

An iframe holds a separate document, so its contents are not part of the page you captured. Treat it as a hole in the layout, and import the embedded page on its own if you need it. UnHTML's public page does not state iframe handling, so read your import report.

Why is my canvas element empty or flat after import?

Canvas is a bitmap drawn by script, with no DOM for what was drawn. A static capture has no shapes to turn into layers. Figma itself warns that canvas-rendered pages may capture imperfectly.

What happens to a video?

The markup carries a poster image and source URLs, but playing frames are not static markup. Figma models video as a fill, so use the poster or a frame you export.

Questions

Does an iframe import into Figma?
An iframe holds a separate document, so its contents are not part of the page you captured. Treat it as a hole in the layout, and import the embedded page on its own if you need it. UnHTML's public page does not state iframe handling, so read your import report.
Why is my canvas element empty or flat after import?
Canvas is a bitmap drawn by script, with no DOM for what was drawn. A static capture has no shapes to turn into layers. Figma itself warns that canvas-rendered pages may capture imperfectly.
What happens to a video?
The markup carries a poster image and source URLs, but playing frames are not static markup. Figma models video as a fill, so use the poster or a frame you export.