mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #24347] bug: Images returned as Base64 in stream/chunk responses are not rendered in the UI #58942
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alihossein on GitHub (May 4, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24347
Check Existing Issues
Installation Method
Other
Open WebUI Version
v0.9.2
Ollama Version (if applicable)
No response
Operating System
Linux
Browser (if applicable)
Google Chrome (Version 135.0.7049.52 (Official Build) (64-bit))
Confirmation
README.md.Expected Behavior
When using a model (e.g., google/gemini-3.1-flash-image-preview via OpenRouter/LiteLLM), the image generation request is successful, and the API returns the image data in Base64 format. However, Open WebUI fails to render the image in the chat interface, leaving the user with no visual result even though the data is present in the API stream.
Expected Behavior
tag or the internal image display component.
Open WebUI should detect the image data within the response stream and automatically render it using an
Actual Behavior
The image is successfully processed by the backend (as seen in the API response logs), but the UI does not display anything to the user.
Steps to Reproduce
Configure an image-capable model via LiteLLM/OpenRouter.
Send a prompt requesting image generation (e.g., "Generate an image of a data center").
Observe the network response: The API returns the image in a delta.images block (Base64 format).
The UI does not render the image and shows nothing or an empty block.
Logs & Screenshots
Screenshots & Logs
I have attached the following evidence:
API Response: The stream contains the Base64 data:{"choices":[{"delta":{"images":[{"type":"image_url","image_url":{"url":"data:image/png;base64,..."}}]}}]}
UI Snapshot: The attached screenshot shows the chat interface after a successful request where no image is rendered.
response.txt
Additional Information
No response
@owui-terminator[bot] commented on GitHub (May 4, 2026):
🔍 Similar Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
#21953 feat: Supports OpenAI format invocation of Gemini-3.1-flash-image-preview
by 17Reset
#20561 issue: [Bug] Code interpreter images fail to render - "Object of type function is not JSON serializable" in file upload (v0.7.1/v0.7.2)
by 4republic ·
bug#20168 issue: hardcoded MIME type in profile image endpoints prevents correct rendering of non-PNG images
by landerrosette ·
bug#20634 issue: OpenRouter image generation
Chunk too bigerrorby eniraa ·
bug#16976 issue: Can't properly display base64-encoded images
by czh020110 ·
bug💡 If this is a duplicate, consider closing it and adding details to the existing issue.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.
@pr-validator-bot commented on GitHub (May 4, 2026):
⚠️ Missing Issue Title Prefix
@alihossein, your issue title is missing a prefix (e.g.,
bug:,feat:,docs:).Please update your issue title to include one of the following prefixes:
Example:
bug: Login fails when using special characters in password