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(notcontent_type.startswith(('image/','video/')))or(request.app.state.config.CONTENT_EXTRACTION_ENGINE=='external'):process_file(...)else:raiseException(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
Deploy Open WebUI via Docker without CONTENT_EXTRACTION_ENGINE environment variable
Connect to a vision-capable model (e.g., via OpenAI-compatible API)
Upload an image in chat
Ask the model to analyze the image
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)
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)
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
Deploy Open WebUI via Docker without CONTENT_EXTRACTION_ENGINE
environment variable
Connect to a vision-capable model (e.g., via OpenAI-compatible API)
Upload an image in chat
Ask the model to analyze the image
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)
<!-- 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: ***@***.***>
>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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 withcontent_typestarting withimage/is uploaded, the code checks:If
CONTENT_EXTRACTION_ENGINEis not set to'external', image files are processed but no URL data is generated. The file is stored with an emptydata: {}field, so whenprocess_chat_payloadinmiddleware.pytries to inject the image into the message content asimage_url, there's no URL to inject.Reproduction Steps
CONTENT_EXTRACTION_ENGINEenvironment variableExpected Behavior
Images should be properly processed and their URLs injected into the message content for vision models, regardless of
CONTENT_EXTRACTION_ENGINEsetting.Workaround
Set the environment variable:
Suggested Fix
Images should always have their URL generated in
datafield, independent of content extraction engine configuration. TheCONTENT_EXTRACTION_ENGINEshould only affect text extraction, not basic image URL availability for vision models.Environment
Related Code
backend/open_webui/routers/files.py- lines 100-135backend/open_webui/utils/middleware.py- lines 2148-2171 (image injection logic)@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:
@tjbck commented on GitHub (Apr 1, 2026):
Unable to reproduce, base64 image is correctly forwarded for openai endpoints.