[GH-ISSUE #24347] bug: Images returned as Base64 in stream/chunk responses are not rendered in the UI #58942

Closed
opened 2026-05-06 00:32:34 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @alihossein on GitHub (May 4, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24347

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

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

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

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
Open WebUI should detect the image data within the response stream and automatically render it using an tag or the internal image display component.

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

Image Image

Additional Information

No response

Originally created by @alihossein on GitHub (May 4, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24347 <!-- Failed to upload "Screenshot from 2026-05-04 16-19-40.png" --> <!-- Failed to upload "Screenshot from 2026-05-04 16-19-40.png" --> <!-- Failed to upload "Screenshot from 2026-05-04 15-44-49.png" --> <!-- Failed to upload "Screenshot from 2026-05-04 16-19-40.png" --> ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### 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 - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### 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** Open WebUI should detect the image data within the response stream and automatically render it using an <img> tag or the internal image display component. ### 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](https://github.com/user-attachments/files/27358325/response.txt) <img width="1920" height="901" alt="Image" src="https://github.com/user-attachments/assets/e077e718-d1c2-4041-8e51-197f74c404a6" /> <img width="1920" height="901" alt="Image" src="https://github.com/user-attachments/assets/5775ab26-3d3e-4529-b22e-ee6bfe820cde" /> ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-06 00:32:35 -05:00
Author
Owner

@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:

  1. #21953 feat: Supports OpenAI format invocation of Gemini-3.1-flash-image-preview
    by 17Reset

  2. #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

  3. #20168 issue: hardcoded MIME type in profile image endpoints prevents correct rendering of non-PNG images
    by landerrosette · bug

  4. #20634 issue: OpenRouter image generation Chunk too big error
    by eniraa · bug

  5. #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.

<!-- gh-comment-id:4371183805 --> @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: 1. [#21953](https://github.com/open-webui/open-webui/issues/21953) **feat: Supports OpenAI format invocation of Gemini-3.1-flash-image-preview** *by 17Reset* 2. [#20561](https://github.com/open-webui/open-webui/issues/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`* 3. [#20168](https://github.com/open-webui/open-webui/issues/20168) **issue: hardcoded MIME type in profile image endpoints prevents correct rendering of non-PNG images** *by landerrosette · `bug`* 4. [#20634](https://github.com/open-webui/open-webui/issues/20634) **issue: OpenRouter image generation `Chunk too big` error** *by eniraa · `bug`* 5. [#16976](https://github.com/open-webui/open-webui/issues/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.
Author
Owner

@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:

  • bug: Bug report or error you've encountered
  • feat: Feature request or enhancement suggestion
  • docs: Documentation issue or improvement request
  • question: Question about usage or functionality
  • help: Request for help or support

Example: bug: Login fails when using special characters in password

<!-- gh-comment-id:4371185238 --> @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: - **bug**: Bug report or error you've encountered - **feat**: Feature request or enhancement suggestion - **docs**: Documentation issue or improvement request - **question**: Question about usage or functionality - **help**: Request for help or support Example: `bug: Login fails when using special characters in password`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58942