Skip to content

Data API: images inserted via API don't render in the Designer canvas + carry no dimension metadata #137

Description

@bigmmind

Two related, long-standing Data API bugs make API-inserted images unusable for real client work, even though the API is otherwise excellent for spinning up sites and content programmatically.

Bug 1 — Images inserted into a CMS Rich Text field via the API vanish in the Designer canvas

An <figure><img src="…"></figure> written into a Rich Text field via the Data API:

  • renders correctly on the published site
  • renders correctly in the CMS item editor (Data panel)
  • but shows an empty placeholder in the Designer canvas, and the image disappears when you double-click the rich text to edit it

No data is lost (publish + CMS panel are fine), but the canvas is where clients actually edit — so the content is not shippable to a client who will later open the article on the canvas.

Bug 2 — API-uploaded images carry no dimension metadata (likely the root cause of Bug 1)

Images created via the Assets API (create_asset + S3 upload) never show a size in the Designer Settings panel. A manually uploaded image always does. The Designer canvas appears to need that width/height + variant metadata to render the image, which is why Bug 1 happens.

Repro

  1. create_asset + POST bytes to S3, or just put any public image URL in the figure markup.
  2. update a collection item's Rich Text field with <figure class="w-richtext-figure-type-image w-richtext-align-floatleft"><div><img src="…"></div></figure>.
  3. Publish → image shows. Open the CMS template in the Designer → placeholder; double-click the rich text → image gone.

Uploading to the site Asset library first and using its hostedUrl does not help — on save Webflow re-ingests the URL into the CMS bucket and rewrites the src, and the result still has no canvas dimensions.

Why this matters

It undermines the core value of the API for development. The point of the API is to build sites and populate content programmatically; if API-inserted images can't be edited on the canvas (the surface clients use), the deliverable isn't handoff-ready. Manual re-upload of every image defeats the automation.

Ask

Generate the same dimension/variant metadata for API-created image assets (and API-inserted rich-text images) that a manual upload produces, so they render in the Designer canvas identically. This looks like a small, high-leverage fix.

Related (years unresolved)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions