openclaw - ✅(Solved) Fix [Bug]: No images shown in the web ui chat [1 pull requests, 1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70674Fetched 2026-04-24 05:54:51
View on GitHub
Comments
1
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×2closed ×1commented ×1cross-referenced ×1

No images shown in the web ui chat: neither what I send, nor that which the agent sends to me. This happened before in the issue #15437 but that issue was closed as "completed". I am running the very latest Open Claw

$ openclaw --version
OpenClaw 2026.4.22 (00bd2cf)

The agent could see the image I uploaded, correctly recognised everything, but then the image disappeared, see the screenshot below:

<img width="1682" height="635" alt="Image" src="https://github.com/user-attachments/assets/e3d97617-d7b1-4244-86a4-617b611a17a3" />

Root Cause

No images shown in the web ui chat: neither what I send, nor that which the agent sends to me. This happened before in the issue #15437 but that issue was closed as "completed". I am running the very latest Open Claw

$ openclaw --version
OpenClaw 2026.4.22 (00bd2cf)

The agent could see the image I uploaded, correctly recognised everything, but then the image disappeared, see the screenshot below:

<img width="1682" height="635" alt="Image" src="https://github.com/user-attachments/assets/e3d97617-d7b1-4244-86a4-617b611a17a3" />

Fix Action

Fixed

PR fix notes

PR #70719: fix(gateway): persist webchat images as managed media

Description (problem / solution / changelog)

Summary

  • Problem: Control UI chat history could lose generated/assistant images because history sanitization strips raw image bytes and the UI had no durable media reference to load after reload.
  • Why it matters: image-only replies and generated images appeared live, then disappeared from the web UI chat after history reload.
  • What changed: assistant image replies are copied into managed Gateway media storage, persisted in transcript content as authenticated media URLs, served through a scoped /api/chat/media/outgoing/.../full route, and rendered by the Control UI through authenticated blob fetches.
  • What did NOT change (scope boundary): provider/model input plumbing still uses existing image attachment paths; sensitive media is still not persisted into transcript content.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #70674
  • Related #70507
  • Related #55671
  • Related #58543
  • Related #70383
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: image replies were stored/displayed as raw inline data or legacy media strings, while chat.history intentionally strips large inline image payloads for safety.
  • Missing detection / guardrail: no regression covered an assistant image reply across chat.send -> transcript persistence -> chat.history -> Control UI render.
  • Contributing context: the previous UI-side image history work handled existing renderable references, but did not create durable references for assistant/generated image payloads.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file:
    • src/gateway/server.chat.gateway-server-chat.test.ts
    • src/gateway/managed-image-attachments.test.ts
    • ui/src/ui/chat/grouped-render.test.ts
  • Scenario the test should lock in: assistant image data URL replies become managed media blocks in chat.history, raw base64 is absent from history payloads, and the UI fetches managed image URLs with auth/session headers before rendering.
  • Why this is the smallest reliable guardrail: it exercises the gateway persistence boundary, the authenticated media route, and the exact UI render path without requiring a live provider.
  • Existing test that already covers this (if any): none.
  • If no new test is added, why not: N/A.

User-visible / Behavior Changes

Control UI chat reloads can display assistant/generated images through durable managed media URLs instead of depending on inline base64 history payloads.

Diagram (if applicable)

Before:
assistant image reply -> inline data / MEDIA text -> chat.history strips bytes -> no image

After:
assistant image reply -> managed media record -> transcript URL -> authenticated UI fetch -> image renders

Security Impact (required)

  • New permissions/capabilities? Yes
  • Secrets/tokens handling changed? No
  • New/changed network calls? Yes
  • Command/tool execution surface changed? No
  • Data access scope changed? Yes
  • If any Yes, explain risk + mitigation: the new media route serves only managed image records. It requires gateway HTTP auth, chat.history scope, requester session ownership for non-privileged auth, UUID attachment ids, and verifies the attachment is still referenced by the transcript before serving bytes.

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: local Node/pnpm repo checkout
  • Model/provider: mocked gateway chat dispatcher
  • Integration/channel (if any): Control UI / webchat
  • Relevant config (redacted): default local test config; QA mock-openai lane

Steps

  1. Send a webchat assistant reply payload with mediaUrls: [data:image/png;base64,...].
  2. Wait for final chat event and reload chat.history.
  3. Verify the assistant message content contains /api/chat/media/outgoing/.../full image blocks and no raw base64.
  4. Render the history message in Control UI and verify the UI fetches the managed image with auth/session headers and renders a blob preview.

Expected

  • History contains a durable image URL and renders an image after reload.

Actual

  • Before this fix, history could omit the image bytes and render no image.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
    • pnpm test src/gateway/managed-image-attachments.test.ts src/gateway/server.chat.gateway-server-chat.test.ts ui/src/ui/chat/grouped-render.test.ts
    • pnpm test src/gateway/server-methods/chat.directive-tags.test.ts src/gateway/managed-image-attachments.test.ts src/gateway/server.chat.gateway-server-chat.test.ts ui/src/ui/chat/grouped-render.test.ts
    • pnpm check:changed
    • pnpm build
    • pnpm openclaw qa suite --provider-mode mock-openai --scenario control-ui-qa-channel-image-roundtrip --output-dir .artifacts/qa-e2e/managed-images-control-ui-pr70719 --concurrency 1
  • Edge cases checked:
    • auth/session gating for managed media route
    • invalid/non-image sources skipped without leaking local paths
    • sensitive image media is not persisted into transcript content
    • directive tags remain persisted where needed while broadcast text remains clean
  • What you did not verify:
    • live provider image generation against a paid provider; mock QA exercised a real Control UI browser session and qa-channel image history reload.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: managed media records could outlive transcript references.
    • Mitigation: cleanup runs from chat.history, transient records expire, and the media route refuses records no longer referenced by transcript history.
  • Risk: browsers cannot attach Authorization headers to raw <img> tags.
    • Mitigation: Control UI fetches managed images with auth/session headers and renders blob URLs.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • docs/web/control-ui.md (modified, +1/-0)
  • src/gateway/managed-image-attachments.test.ts (added, +992/-0)
  • src/gateway/managed-image-attachments.ts (added, +1097/-0)
  • src/gateway/server-http.ts (modified, +23/-0)
  • src/gateway/server-methods/chat.directive-tags.test.ts (modified, +3/-4)
  • src/gateway/server-methods/chat.ts (modified, +352/-24)
  • src/gateway/server.chat.gateway-server-chat.test.ts (modified, +94/-0)
  • ui/src/ui/chat/grouped-render.test.ts (modified, +90/-0)
  • ui/src/ui/chat/grouped-render.ts (modified, +139/-18)

Code Example

$ openclaw --version
OpenClaw 2026.4.22 (00bd2cf)

---
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

No images shown in the web ui chat: neither what I send, nor that which the agent sends to me. This happened before in the issue #15437 but that issue was closed as "completed". I am running the very latest Open Claw

$ openclaw --version
OpenClaw 2026.4.22 (00bd2cf)

The agent could see the image I uploaded, correctly recognised everything, but then the image disappeared, see the screenshot below:

<img width="1682" height="635" alt="Image" src="https://github.com/user-attachments/assets/e3d97617-d7b1-4244-86a4-617b611a17a3" />

Steps to reproduce

  1. Connect to Open Claw Web UI (running on Ubuntu 22.04.5 x86_64 architecture)
  2. Send some image and ask it to describe what's on it
  3. Observe that the image is analysed correctly, but then disappears
  4. Likewise, if the agents send an image to me

Expected behavior

Obviously, all images should be shown inline in the chat. In Telegram channel this works fine.

Actual behavior

Images disappear after being shown briefly.

OpenClaw version

2026.4.22 (00bd2cf)

Operating system

Ubuntu Linux 22.04.5

Install method

curl -fsSL https://openclaw.ai/install.sh | bash

Model

gemini-3-flash-preview

Provider / routing chain

ollama.com

Additional provider/model setup details

I use my own provider proxy which I wrote in python, but eventually it goes to ollama.com

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue with images not being displayed in the OpenClaw web UI chat may be related to a regression bug, and verifying the image handling logic in the custom provider proxy or the OpenClaw configuration could help resolve the issue.

Guidance

  • Review the custom provider proxy written in Python to ensure it correctly handles image data and forwarding to ollama.com.
  • Check the OpenClaw configuration for any settings related to image display or caching that might be causing the images to disappear.
  • Compare the behavior with the Telegram channel, where images are displayed correctly, to identify potential differences in handling or configuration.
  • Investigate the possibility of a caching issue or a problem with the image URL generation in the OpenClaw web UI.

Example

No specific code example can be provided without more details on the custom provider proxy or OpenClaw configuration, but reviewing the image handling logic in the proxy or configuration files could look something like checking for correct MIME type handling or ensuring that image URLs are correctly generated and passed to the web UI.

Notes

The issue seems to be related to a previous bug (#15437) that was marked as completed, but the current behavior suggests a regression. The custom provider proxy and OpenClaw configuration are potential points of investigation due to their involvement in image handling and display.

Recommendation

Apply workaround: Since the issue is likely related to a regression or a configuration problem, applying a workaround such as adjusting the custom provider proxy or OpenClaw configuration to correctly handle images might resolve the issue until a more permanent fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Obviously, all images should be shown inline in the chat. In Telegram channel this works fine.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: No images shown in the web ui chat [1 pull requests, 1 comments, 1 participants]