Included in the Free plan Free

Generate responsive picture tag HTML from Figma

Pick the formats and resolutions you plan to ship, and UIXport writes the picture element for your selected layer: a source for each modern format, plus an img fallback with srcset. It writes markup only. You export the matching image files from the Exporter tab.

How it works

  1. Step 1: Select one layer

    Select the frame or layer the image comes from. Picture Tag writes markup for the first selected item only. Give the layer a simple name such as hero-image, because the markup turns spaces and symbols in the name into underscores.

  2. Step 2: Open Picture Tag

    Open the Dev tools tab and choose Picture Tag from the Tools list.

  3. Step 3: Choose formats

    Under Included formats, turn on the formats you will ship: AVIF, WEBP, PNG or JPG. AVIF, WEBP and PNG are on by default. AVIF export is Pro (10 free Pro runs a month on Free), so you may want to turn AVIF off on the Free plan.

  4. Step 4: Set resolutions and fallback

    Under Resolutions, pick 1x, 2x or 3x (1x and 2x are on by default). Set Fallback src format to PNG, JPG or WebP. That format goes in the img tag, and the others become source elements.

  5. Step 5: Copy the HTML

    Click Copy HTML under Generated HTML Code and paste the markup into your page or component. The alt text is the layer name, so replace it with a description of the image.

  6. Step 6: Export matching files

    In the Exporter tab, add one row per format and scale. AVIF rows are Pro. The markup expects names like hero-image.png and [email protected], so set the Filename suffix of each 2x row to @2x. If the layer name has spaces or symbols, the markup uses underscores where the exported file keeps them, so rename the layer and copy the HTML again, or rename the files to match.

Why use it

  • Modern formats first

    Sources are ordered AVIF, then WebP, then PNG or JPG, each with its MIME type. Browsers take the first format they support, and older ones fall back to the img tag.

  • Sharp on high-density screens

    Each format lists the resolutions you picked as 1x, 2x and 3x candidates in srcset, so a retina screen can load the sharper file.

  • Sensible img defaults

    The fallback img comes with loading="lazy" and decoding="async", so images further down the page do not hold up the first render. For an image at the top of the page, remove loading="lazy" so it loads right away.

  • No hand-typed srcset

    File names, format types and density descriptors are written for you, which removes the usual typos in long srcset lists.

  • Free to run as often as you like

    Picture Tag only writes markup, and it is free with no limit.

Specs

Picture tag generator specifications
WhereDev tools tab, Picture Tag
InputThe first selected Figma layer
Included formatsAVIF, WEBP, PNG, JPG (default: AVIF, WEBP, PNG)
Resolutions1x, 2x, 3x (default: 1x and 2x)
Fallback src formatPNG (default), JPG or WebP
OutputA picture element with one source per non-fallback format, then an img with src, srcset, alt (the layer name), loading="lazy" and decoding="async"
Expected file namesname.ext for 1x, [email protected] for 2x, and so on. Spaces and symbols in the layer name become underscores
Image filesNot exported by this tool. Use the Exporter tab
PlanFree, no limit
RunsInside Figma. Nothing is uploaded

Questions about Picture tag generator

Does Picture Tag export the images too?

No. It writes HTML only. Export the files from the Exporter tab with the same formats and scales. AVIF export is Pro, with 10 free Pro runs a month on Free, or you can turn off AVIF under Included formats.

Why do my exported file names not match the markup?

The markup turns spaces and symbols in the layer name into underscores and expects names like name.png and [email protected]. The Exporter names files with the {frame} pattern, keeps spaces and adds no scale by default. Rename the layer (for example to hero-image) before you generate the HTML and export, or rename the files to match. Then set @2x or @3x as the Filename suffix on scaled rows, and check the names match before you publish.

Can I generate markup for several images at once?

No. Picture Tag uses the first selected item only. Select each image in turn and copy its HTML.

Is Picture Tag free?

Yes. Generating and copying the HTML is free and unlimited. Exporting the PNG, JPG and WebP files in the Exporter tab is unlimited on Free too. AVIF files are Pro.

What happens in a browser that cannot show AVIF?

The browser skips any source whose type it does not support and moves on to the next one, ending at the img fallback. That is why the fallback should be a widely supported format such as PNG or JPG.

Try UIXport free in Figma

Install the plugin from Figma Community. Free includes unlimited core exports and 10 Pro runs a month; Pro adds motion export, print-ready PDFs, AVIF and more.