Setting the file. One moment.
Skill 16 · Webflow Mcp:figma To Webflow
Subchapter 16.1
references/assets-and-svg.mdMarkdown6 KBView on GitHub
Read this before exporting, uploading, or placing images, SVGs, logos, icons, or fonts.
get_metadata, get_design_context, and get_variable_defs early.download_assets and treat it as one image instead of rebuilding every layer.asset_tool upload_image_by_url; it is Designer Bridge-gated and may be removed.data_assets_tool create_asset with site_id, file_name, and file_hash.policy is pure base64 ASCII before POSTing:printf '%s' "$POLICY" | grep -q '[^A-Za-z0-9+/=]' && echo "ABORT: non-ASCII in policy"size:0 or has no variants, report that Webflow accepted the upload but has not processed a renderable asset.set_image_asset, or create the Image with data_element_builder and set_image_asset.<img src="...">; it is inserted without a managed Webflow asset.width:100%; height:100%; object-fit:cover; display:block.size:0 assets when safe.HtmlEmbed, not uploaded SVG assets in <img>, unless the user explicitly approves fallback.<img> can render as a filled blob; inline embed avoids that.download_assets / design-context SVG export only when clipboard output is unavailable, and expect scaffolding to strip.HtmlEmbed first, then set code via data_element_tool set_settings with key "code" as static_text.static_text.value of the code setting and let the tool layer encode it. Do not hand-build, pre-escape, or wrap the arguments in a raw/blob form. If you get “could not be parsed as JSON,” the tool call is malformed; fix the call shape, do not shrink the SVG.set_settings ceiling; 20 KB can pass as a string value. The real practical limit is Webflow Designer’s HTML Embed UI, about 10,000 characters. Data API embeds over ~10k can render, but they are not safely hand-editable in Designer and may be truncated if opened/re-saved. If the embed must remain Designer-editable, reduce it below ~10k.<svg> where possible.<rect> elements by oversized dimensions, not just fill; some inherit the root fill and render as a giant dark box.<path> elements, often #F4F1FD or #F3F5F7.<rect stroke="#9747FF" stroke-dasharray=...>.<g id> elements when not needed.<defs><clipPath> scaffolding only when no kept artwork references it.id attributes.url(#...) gradients/clips.fill="white" inside kept <defs><clipPath> alone; those are masks.url(#id) must resolve to a kept element. If embedding the same SVG more than once on a page, suffix gradient/clip ids uniquely per instance and update every url(#...) reference, because duplicate ids resolve to the first match.viewBox with empty space so height-based sizing renders tiny artwork. Crop the viewBox to ink/artwork bounds; for height-based sizing, put style="height:Npx; width:auto; display:block" on the root <svg>.id="X" contains d="X" as a substring. Match \sd=", not bare d=".<img> with an embed loses the image’s classes/margins; reapply spacing on the embed.set_text("") on a Link that contains icon embeds; it can wipe child embeds.data_fonts_tool: create_font with MD5 file_hash, then presigned upload.css2 latin endpoint with a desktop User-Agent when needed.<link> tags to page/site head after uploading fonts; they create duplicate @font-face declarations.font-display: swap. Warm the cache with a throwaway/full-page snapshot and re-snapshot before changing font implementation.