[GH-ISSUE #23263] issue: Images uploaded but not sent to vision-capable models #58601

Closed
opened 2026-05-05 23:31:15 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @savagezhao-ai on GitHub (Mar 31, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23263

Bug: Images uploaded but not sent to vision-capable models

Description

When uploading an image in Open WebUI and sending it to a vision-capable model (e.g., Qwen3.5-9B via oMLX), the model responds that no image was uploaded, even though the image appears to be attached in the UI.

Root Cause

In backend/open_webui/routers/files.py (lines 122-132), when a file with content_type starting with image/ is uploaded, the code checks:

elif (not content_type.startswith(('image/', 'video/'))) or (
    request.app.state.config.CONTENT_EXTRACTION_ENGINE == 'external'
):
    process_file(...)
else:
    raise Exception(f'File type {content_type} is not supported for processing')

If CONTENT_EXTRACTION_ENGINE is not set to 'external', image files are processed but no URL data is generated. The file is stored with an empty data: {} field, so when process_chat_payload in middleware.py tries to inject the image into the message content as image_url, there's no URL to inject.

Reproduction Steps

  1. Deploy Open WebUI via Docker without CONTENT_EXTRACTION_ENGINE environment variable
  2. Connect to a vision-capable model (e.g., via OpenAI-compatible API)
  3. Upload an image in chat
  4. Ask the model to analyze the image
  5. Model responds: "No image was uploaded"

Expected Behavior

Images should be properly processed and their URLs injected into the message content for vision models, regardless of CONTENT_EXTRACTION_ENGINE setting.

Workaround

Set the environment variable:

docker run ... -e CONTENT_EXTRACTION_ENGINE=external ...

Suggested Fix

Images should always have their URL generated in data field, independent of content extraction engine configuration. The CONTENT_EXTRACTION_ENGINE should only affect text extraction, not basic image URL availability for vision models.

Environment

  • Open WebUI version: v0.8.12 (main branch)
  • Deployment: Docker
  • Model: Qwen3.5-9B via oMLX (OpenAI-compatible API)
  • backend/open_webui/routers/files.py - lines 100-135
  • backend/open_webui/utils/middleware.py - lines 2148-2171 (image injection logic)
Originally created by @savagezhao-ai on GitHub (Mar 31, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23263 ## Bug: Images uploaded but not sent to vision-capable models ### Description When uploading an image in Open WebUI and sending it to a vision-capable model (e.g., Qwen3.5-9B via oMLX), the model responds that no image was uploaded, even though the image appears to be attached in the UI. ### Root Cause In `backend/open_webui/routers/files.py` (lines 122-132), when a file with `content_type` starting with `image/` is uploaded, the code checks: ```python elif (not content_type.startswith(('image/', 'video/'))) or ( request.app.state.config.CONTENT_EXTRACTION_ENGINE == 'external' ): process_file(...) else: raise Exception(f'File type {content_type} is not supported for processing') ``` If `CONTENT_EXTRACTION_ENGINE` is not set to `'external'`, image files are processed but **no URL data is generated**. The file is stored with an empty `data: {}` field, so when `process_chat_payload` in `middleware.py` tries to inject the image into the message content as `image_url`, there's no URL to inject. ### Reproduction Steps 1. Deploy Open WebUI via Docker without `CONTENT_EXTRACTION_ENGINE` environment variable 2. Connect to a vision-capable model (e.g., via OpenAI-compatible API) 3. Upload an image in chat 4. Ask the model to analyze the image 5. Model responds: "No image was uploaded" ### Expected Behavior Images should be properly processed and their URLs injected into the message content for vision models, regardless of `CONTENT_EXTRACTION_ENGINE` setting. ### Workaround Set the environment variable: ```bash docker run ... -e CONTENT_EXTRACTION_ENGINE=external ... ``` ### Suggested Fix Images should always have their URL generated in `data` field, independent of content extraction engine configuration. The `CONTENT_EXTRACTION_ENGINE` should only affect text extraction, not basic image URL availability for vision models. ### Environment - Open WebUI version: v0.8.12 (main branch) - Deployment: Docker - Model: Qwen3.5-9B via oMLX (OpenAI-compatible API) ### Related Code - `backend/open_webui/routers/files.py` - lines 100-135 - `backend/open_webui/utils/middleware.py` - lines 2148-2171 (image injection logic)
Author
Owner

@leanderchandra1231-debug commented on GitHub (Mar 31, 2026):

Thanks for the detailed report and clear root cause analysis—this is very
helpful.

On Tue, Mar 31, 2026, 8:55 AM savagezhao-ai @.***>
wrote:

savagezhao-ai created an issue (open-webui/open-webui#23263)
https://github.com/open-webui/open-webui/issues/23263
Bug: Images uploaded but not sent to vision-capable models Description

When uploading an image in Open WebUI and sending it to a vision-capable
model (e.g., Qwen3.5-9B via oMLX), the model responds that no image was
uploaded, even though the image appears to be attached in the UI.
Root Cause

In backend/open_webui/routers/files.py (lines 122-132), when a file with
content_type starting with image/ is uploaded, the code checks:

elif (not content_type.startswith(('image/', 'video/'))) or (
request.app.state.config.CONTENT_EXTRACTION_ENGINE == 'external'
):
process_file(...)else:
raise Exception(f'File type {content_type} is not supported for processing')

If CONTENT_EXTRACTION_ENGINE is not set to 'external', image files are
processed but no URL data is generated. The file is stored with an
empty data: {} field, so when process_chat_payload in middleware.py tries
to inject the image into the message content as image_url, there's no URL
to inject.
Reproduction Steps

  1. Deploy Open WebUI via Docker without CONTENT_EXTRACTION_ENGINE
    environment variable
  2. Connect to a vision-capable model (e.g., via OpenAI-compatible API)
  3. Upload an image in chat
  4. Ask the model to analyze the image
  5. Model responds: "No image was uploaded"

Expected Behavior

Images should be properly processed and their URLs injected into the
message content for vision models, regardless of CONTENT_EXTRACTION_ENGINE
setting.
Workaround

Set the environment variable:

docker run ... -e CONTENT_EXTRACTION_ENGINE=external ...

Suggested Fix

Images should always have their URL generated in data field, independent
of content extraction engine configuration. The CONTENT_EXTRACTION_ENGINE
should only affect text extraction, not basic image URL availability for
vision models.
Environment

  • Open WebUI version: v0.8.12 (main branch)
  • Deployment: Docker
  • Model: Qwen3.5-9B via oMLX (OpenAI-compatible API)

Related Code

  • backend/open_webui/routers/files.py - lines 100-135
  • backend/open_webui/utils/middleware.py - lines 2148-2171 (image
    injection logic)


Reply to this email directly, view it on GitHub
https://github.com/open-webui/open-webui/issues/23263?email_source=notifications&email_token=CAYA3ID5YYKNHTBPKKLBN6T4TPE6TA5CNFSL4Z3JMQ5C6L3HNF2C22DVMIXUS43TOVSS6NBRG44TINBQGI4TLJTSMVQXG33OVJZXKYTTMNZGSYTFMSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/CAYA3IES7YIOX33CEXXXFIT4TPE6TAVCNFSM6AAAAACXHZB23WVHI2DSMVQWIX3LMV43ASLTON2WKOZUGE3TSNBUGAZDSNI
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

<!-- gh-comment-id:4163069016 --> @leanderchandra1231-debug commented on GitHub (Mar 31, 2026): Thanks for the detailed report and clear root cause analysis—this is very helpful. On Tue, Mar 31, 2026, 8:55 AM savagezhao-ai ***@***.***> wrote: > *savagezhao-ai* created an issue (open-webui/open-webui#23263) > <https://github.com/open-webui/open-webui/issues/23263> > Bug: Images uploaded but not sent to vision-capable models Description > > When uploading an image in Open WebUI and sending it to a vision-capable > model (e.g., Qwen3.5-9B via oMLX), the model responds that no image was > uploaded, even though the image appears to be attached in the UI. > Root Cause > > In backend/open_webui/routers/files.py (lines 122-132), when a file with > content_type starting with image/ is uploaded, the code checks: > > elif (not content_type.startswith(('image/', 'video/'))) or ( > request.app.state.config.CONTENT_EXTRACTION_ENGINE == 'external' > ): > process_file(...)else: > raise Exception(f'File type {content_type} is not supported for processing') > > If CONTENT_EXTRACTION_ENGINE is not set to 'external', image files are > processed but *no URL data is generated*. The file is stored with an > empty data: {} field, so when process_chat_payload in middleware.py tries > to inject the image into the message content as image_url, there's no URL > to inject. > Reproduction Steps > > 1. Deploy Open WebUI via Docker without CONTENT_EXTRACTION_ENGINE > environment variable > 2. Connect to a vision-capable model (e.g., via OpenAI-compatible API) > 3. Upload an image in chat > 4. Ask the model to analyze the image > 5. Model responds: "No image was uploaded" > > Expected Behavior > > Images should be properly processed and their URLs injected into the > message content for vision models, regardless of CONTENT_EXTRACTION_ENGINE > setting. > Workaround > > Set the environment variable: > > docker run ... -e CONTENT_EXTRACTION_ENGINE=external ... > > Suggested Fix > > Images should always have their URL generated in data field, independent > of content extraction engine configuration. The CONTENT_EXTRACTION_ENGINE > should only affect text extraction, not basic image URL availability for > vision models. > Environment > > - Open WebUI version: v0.8.12 (main branch) > - Deployment: Docker > - Model: Qwen3.5-9B via oMLX (OpenAI-compatible API) > > Related Code > > - backend/open_webui/routers/files.py - lines 100-135 > - backend/open_webui/utils/middleware.py - lines 2148-2171 (image > injection logic) > > — > Reply to this email directly, view it on GitHub > <https://github.com/open-webui/open-webui/issues/23263?email_source=notifications&email_token=CAYA3ID5YYKNHTBPKKLBN6T4TPE6TA5CNFSL4Z3JMQ5C6L3HNF2C22DVMIXUS43TOVSS6NBRG44TINBQGI4TLJTSMVQXG33OVJZXKYTTMNZGSYTFMSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/CAYA3IES7YIOX33CEXXXFIT4TPE6TAVCNFSM6AAAAACXHZB23WVHI2DSMVQWIX3LMV43ASLTON2WKOZUGE3TSNBUGAZDSNI> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >
Author
Owner

@tjbck commented on GitHub (Apr 1, 2026):

Unable to reproduce, base64 image is correctly forwarded for openai endpoints.

<!-- gh-comment-id:4168970337 --> @tjbck commented on GitHub (Apr 1, 2026): Unable to reproduce, base64 image is correctly forwarded for openai endpoints.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58601