[GH-ISSUE #4474] support image with url when chat with vison model #2796

Open
opened 2026-04-12 13:07:39 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @dickens88 on GitHub (May 16, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4474

Hi thanks the Ollama team that made this helpful tool.

recently, chatgpt-4o api also support vision mode. they provide two method for uploading an image to the chat. one is encode the image to base64 that Ollama also use the same way. And another way is with url. with the url, chatgpt chat platform can automatically download the image and add to the chat.

Here is some descriptions about this functions in offical API docs

Managing images
The Chat Completions API, unlike the Assistants API, is not stateful. That means you have to manage the messages (including images) you pass to the model yourself. If you want to pass the same image to the model multiple times, you will have to pass the image each time you make a request to the API.
For long running conversations, we suggest passing images via URL's instead of base64. The latency of the model can also be improved by downsizing your images ahead of time to be less than the maximum size they are expected them to be. For low res mode, we expect a 512px x 512px image. For high res mode, the short side of the image should be less than 768px and the long side should be less than 2,000px.
After an image has been processed by the model, it is deleted from OpenAI servers and not retained. We do not use data uploaded via the OpenAI API to train our models.

Is it possible to support this way in Ollama?

Originally created by @dickens88 on GitHub (May 16, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4474 Hi thanks the Ollama team that made this helpful tool. recently, chatgpt-4o api also support vision mode. they provide two method for uploading an image to the chat. one is encode the image to base64 that Ollama also use the same way. And another way is with url. with the url, chatgpt chat platform can automatically download the image and add to the chat. Here is some descriptions about this functions in [offical API docs](https://platform.openai.com/docs/guides/vision) > [Managing images](https://platform.openai.com/docs/guides/vision/managing-images) The Chat Completions API, unlike the Assistants API, is not stateful. That means you have to manage the messages (including images) you pass to the model yourself. If you want to pass the same image to the model multiple times, you will have to pass the image each time you make a request to the API. For long running conversations, we suggest passing images via URL's instead of base64. The latency of the model can also be improved by downsizing your images ahead of time to be less than the maximum size they are expected them to be. For low res mode, we expect a 512px x 512px image. For high res mode, the short side of the image should be less than 768px and the long side should be less than 2,000px. After an image has been processed by the model, it is deleted from OpenAI servers and not retained. [We do not use data uploaded via the OpenAI API to train our models](https://openai.com/enterprise-privacy). Is it possible to support this way in Ollama?
GiteaMirror added the feature requestapi labels 2026-04-12 13:07:39 -05:00
Author
Owner

@thinkverse commented on GitHub (May 16, 2024):

There's a PR for it - https://github.com/ollama/ollama/pull/2506, but no update has been done since it was opened in February.

<!-- gh-comment-id:2115531891 --> @thinkverse commented on GitHub (May 16, 2024): There's a PR for it - https://github.com/ollama/ollama/pull/2506, but no update has been done since it was opened in February.
Author
Owner

@matbeedotcom commented on GitHub (May 16, 2024):

There's a PR for it - #2506, but no update has been done since it was opened in February.

I'm not going to update the PR until the ollama team acknowledge it. Not wasting my time.

<!-- gh-comment-id:2116276708 --> @matbeedotcom commented on GitHub (May 16, 2024): > There's a PR for it - #2506, but no update has been done since it was opened in February. I'm not going to update the PR until the ollama team acknowledge it. Not wasting my time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#2796