issue: Multimodal API Fails to Recognize Base64-Encoded Image in Open WebUI v0.5.10 #13298
Replies: 4 comments 1 reply
-
|
Same issue here. Not sure why this was converted to a discussion when it’s clearly a bug |
Beta Was this translation helpful? Give feedback.
-
|
Your format for images is wrong, base64 image content is represented like this "messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,iVBOxxxxxxxxxxxxxxx"
}
}
]
}
],Took some digging when I had the same error. Open webui is using openai's input message scheme, and the url should be an object. Type is |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for your solution; it successfully resolved the issue. On a separate note, I found something confusing in the official OpenAI documentation. It seems they use This is quite puzzling. Does OpenWebUI partially adopt OpenAI's calling conventions? |
Beta Was this translation helpful? Give feedback.
-
|
From open-webui ui on iphone (safari) uploading an image (upload file, then choosing photo library) works but am getting error "400: 'url' field must be a base64 encoded image" when using the same image (or any other) from a pc browser. Is the upload function from pc browser describing the photo attachment differently? any ideas to fix? Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.5.10
Ollama Version (if applicable)
No response
Operating System
centos 7
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
The API should analyze the provided base64-encoded image and return a description of its content (e.g., objects, text, or scene details) when prompted with "What’s in this image?".
Actual Behavior
The API responds with:
This implies the model did not detect the uploaded image in the request, even though the image is included as a valid base64 payload.
Steps to Reproduce
Logs & Screenshots
Additional Information
The base64 string is shortened for readability (full string validated via online decoders).
No server-side error logs were provided by Open WebUI (ensure debug mode is enabled if available).
Beta Was this translation helpful? Give feedback.
All reactions