[GH-ISSUE #15299] Gemma4 doesn't support images in ollama v0.20.0 #71848

Open
opened 2026-05-05 02:42:15 -05:00 by GiteaMirror · 15 comments
Owner

Originally created by @Aigle-2 on GitHub (Apr 3, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15299

What is the issue?

As title says. It should be able to do it, according to the google's documentation.

Image

Relevant log output


OS

Windows

GPU

Nvidia

CPU

AMD

Ollama version

0.20.0

Originally created by @Aigle-2 on GitHub (Apr 3, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15299 ### What is the issue? As title says. It should be able to do it, according to the google's documentation. <img width="1761" height="858" alt="Image" src="https://github.com/user-attachments/assets/28cefaed-806c-4ead-b72a-422acb2f6a4c" /> ### Relevant log output ```shell ``` ### OS Windows ### GPU Nvidia ### CPU AMD ### Ollama version 0.20.0
GiteaMirror added the bug label 2026-05-05 02:42:15 -05:00
Author
Owner

@premmaddali commented on GitHub (Apr 3, 2026):

how is the model loading even. On my windows it crashes on load itself.

<!-- gh-comment-id:4184665857 --> @premmaddali commented on GitHub (Apr 3, 2026): how is the model loading even. On my windows it crashes on load itself.
Author
Owner

@rick-github commented on GitHub (Apr 3, 2026):

$ ollama run gemma4 what is this image ./image1.jpg 
Added image './image1.jpg'
...

This image is a **photograph of an extremely cute, fluffy puppy.**
<!-- gh-comment-id:4184706274 --> @rick-github commented on GitHub (Apr 3, 2026): ```console $ ollama run gemma4 what is this image ./image1.jpg Added image './image1.jpg' ... This image is a **photograph of an extremely cute, fluffy puppy.** ```
Author
Owner

@directorboint-arch commented on GitHub (Apr 6, 2026):

It's not working for me either... I tried it on 31B

<!-- gh-comment-id:4192351860 --> @directorboint-arch commented on GitHub (Apr 6, 2026): It's not working for me either... I tried it on 31B
Author
Owner

@rick-github commented on GitHub (Apr 6, 2026):

$ ollama run gemma4:31b what is this image ./image1.jpg
Added image './image1.jpg'
Thinking...
1.  **Analyze the user's request:** The user has provided an image and asked "what is this image".
...
...done thinking.

This image is of a small, white puppy sitting on a stone surface. The puppy is wearing a red collar with a small gold bell attached to it.
<!-- gh-comment-id:4192362188 --> @rick-github commented on GitHub (Apr 6, 2026): ```console $ ollama run gemma4:31b what is this image ./image1.jpg Added image './image1.jpg' Thinking... 1. **Analyze the user's request:** The user has provided an image and asked "what is this image". ... ...done thinking. This image is of a small, white puppy sitting on a stone surface. The puppy is wearing a red collar with a small gold bell attached to it. ```
Author
Owner

@Aigle-2 commented on GitHub (Apr 8, 2026):

then it's an ollama windows UI issue

<!-- gh-comment-id:4205122166 --> @Aigle-2 commented on GitHub (Apr 8, 2026): then it's an ollama windows UI issue
Author
Owner

@rick-github commented on GitHub (Apr 8, 2026):

Image

I notice that your screenshot doesn't have the "Enable web search" icon, is it possible you are running an older version of the UI?

<!-- gh-comment-id:4207881170 --> @rick-github commented on GitHub (Apr 8, 2026): <img width="549" height="548" alt="Image" src="https://github.com/user-attachments/assets/2dd0149d-9bb5-4859-bf23-99fb46ac2fb5" /> I notice that your screenshot doesn't have the "Enable web search" icon, is it possible you are running an older version of the UI?
Author
Owner

@directorboint-arch commented on GitHub (Apr 8, 2026):

The plot thickens....

<!-- gh-comment-id:4208599816 --> @directorboint-arch commented on GitHub (Apr 8, 2026): The plot thickens....
Author
Owner

@quicoto commented on GitHub (Apr 10, 2026):

On MacOS running GUI Version 0.20.5 with gemma4:e4b it doesn't take images

Terminal works fine, of course

ollama run gemma4:e4b "describe this image" ./my-image.png

Checking for Capabilities it correctly shows "vision"

ollama show gemma4:e4b

Output:

  Capabilities
    completion    
    vision        
    audio         
    tools         
    thinking      
<!-- gh-comment-id:4223905015 --> @quicoto commented on GitHub (Apr 10, 2026): On MacOS running GUI Version 0.20.5 with gemma4:e4b it doesn't take images ❌ Terminal works fine, of course ✅ ``` ollama run gemma4:e4b "describe this image" ./my-image.png ``` Checking for Capabilities it correctly shows "vision" ``` ollama show gemma4:e4b ``` Output: ``` Capabilities completion vision audio tools thinking ```
Author
Owner

@matt-bader commented on GitHub (Apr 11, 2026):

@quicoto Before Ollama knows that the model supports images, you need to run a prompt first so that the model is actually downloaded. After that, you can attach images and run web searches. The same might be the issue in @Aigle-2's case.

<!-- gh-comment-id:4228564258 --> @matt-bader commented on GitHub (Apr 11, 2026): @quicoto Before Ollama knows that the model supports images, you need to run a prompt first so that the model is actually downloaded. After that, you can attach images and run web searches. The same might be the issue in @Aigle-2's case.
Author
Owner

@quicoto commented on GitHub (Apr 11, 2026):

@matt-bader Thanks, the model is downloaded fine as I can prompt it with text via GUI just fine. As mentioned using all the terminal commands work perfectly, my assumption is it's GUI that's not seeing the model metadata for "vision" capability.

EDIT: I just fired Ollama again to see if there was an update, now it does allow me to attach images. Very strange. Same model version, same GUI version 🤷‍♂️ Solved for me

<!-- gh-comment-id:4228584798 --> @quicoto commented on GitHub (Apr 11, 2026): @matt-bader Thanks, the model is downloaded fine as I can prompt it with text via GUI just fine. As mentioned using all the terminal commands work perfectly, my assumption is it's GUI that's not seeing the model metadata for "vision" capability. EDIT: I just fired Ollama again to see if there was an update, now it does allow me to attach images. Very strange. Same model version, same GUI version 🤷‍♂️ Solved for me ✅
Author
Owner

@ivaigult commented on GitHub (Apr 16, 2026):

Seems like images upload is broken at the API level. I cannot access this functionality in opencode. However, it all works fine via ollama run. So, to work this around I added these lines to my AGENS.md:

# Agents Notes

- Images are broken: The agent cannot directly "see" image files via standard tool outputs. To analyze images, you must use the Image Analysis Workflow below.
- Image Analysis Workflow:
    - Use `bash` tool to run `ollama run gemma4:31b-cloud` with a prompt to analyze the specific image file in CWD.
    - Request a detailed description of layout, colors, typography, and aesthetics to create a technical specification for implementation.
<!-- gh-comment-id:4262035562 --> @ivaigult commented on GitHub (Apr 16, 2026): Seems like images upload is broken at the API level. I cannot access this functionality in `opencode`. However, it all works fine via `ollama run`. So, to work this around I added these lines to my `AGENS.md`: ``` # Agents Notes - Images are broken: The agent cannot directly "see" image files via standard tool outputs. To analyze images, you must use the Image Analysis Workflow below. - Image Analysis Workflow: - Use `bash` tool to run `ollama run gemma4:31b-cloud` with a prompt to analyze the specific image file in CWD. - Request a detailed description of layout, colors, typography, and aesthetics to create a technical specification for implementation. ```
Author
Owner

@rick-github commented on GitHub (Apr 16, 2026):

If ollama run works then it's not an API issue, since ollama run is a wrapper around the API. Apparently for opencode an image agent needs to be created.

<!-- gh-comment-id:4262132036 --> @rick-github commented on GitHub (Apr 16, 2026): If `ollama run` works then it's not an API issue, since `ollama run` is a wrapper around the API. Apparently for `opencode` an [image agent](https://www.alibabacloud.com/help/en/model-studio/add-vision-skill#d5900db6a52yp) needs to be created.
Author
Owner

@ivaigult commented on GitHub (Apr 16, 2026):

Thank you @rick-github, I edited my config to add the modalities, and it works again now:

  "gemma4:31b-cloud": {
    "_launch": true,
    "limit": {
      "context": 262144,
      "output": 131072
    },
    "name": "gemma4:31b-cloud",
    "modalities": {
      "input": [
        "text",
        "image"
      ],
      "output": [
        "text"
      ]
    }
  }

However, I'm still quite confused, because this has never been required before. I see other models are now requiring this too to accept images. E.g. qweb3.5:cloud now requires a similar configuration😕 I will keep digging.

<!-- gh-comment-id:4263400323 --> @ivaigult commented on GitHub (Apr 16, 2026): Thank you @rick-github, I edited my config to add the modalities, and it works again now: ``` "gemma4:31b-cloud": { "_launch": true, "limit": { "context": 262144, "output": 131072 }, "name": "gemma4:31b-cloud", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } } ``` However, I'm still quite confused, because this has never been required before. I see other models are now requiring this too to accept images. E.g. `qweb3.5:cloud` now requires a similar configuration😕 I will keep digging.
Author
Owner

@ivaigult commented on GitHub (Apr 16, 2026):

Yes, the problem I'm observing is different, and it's an opencode problem. ollama is correctly reporting the model capabilities:

$ curl -s -X POST http://localhost:11434/api/show   -H "Content-Type: application/json"   -d '{"name":"gemma4:31b-cloud"}'   | python3 -c "import sys,json; d=json.load(sys.stdin); print('gemma4:31b-cloud:', 'vision' in d.get('capabilities',[]))"
> gemma4:31b-cloud: True
<!-- gh-comment-id:4263939258 --> @ivaigult commented on GitHub (Apr 16, 2026): Yes, the problem I'm observing is different, and it's an `opencode` problem. `ollama` *is correctly* reporting the model capabilities: ``` $ curl -s -X POST http://localhost:11434/api/show -H "Content-Type: application/json" -d '{"name":"gemma4:31b-cloud"}' | python3 -c "import sys,json; d=json.load(sys.stdin); print('gemma4:31b-cloud:', 'vision' in d.get('capabilities',[]))" > gemma4:31b-cloud: True ```
Author
Owner

@PureBlissAK commented on GitHub (Apr 18, 2026):

🤖 Automated Triage & Analysis Report

Issue: #15299
Analyzed: 2026-04-18T18:22:40.585787

Analysis

  • Type: unknown
  • Severity: medium
  • Components: unknown

Implementation Plan

  • Effort: medium
  • Steps:

This issue has been triaged and marked for implementation.

<!-- gh-comment-id:4274310418 --> @PureBlissAK commented on GitHub (Apr 18, 2026): <!-- ollama-issue-orchestrator:v1 issue:15299 --> ## 🤖 Automated Triage & Analysis Report **Issue**: #15299 **Analyzed**: 2026-04-18T18:22:40.585787 ### Analysis - **Type**: unknown - **Severity**: medium - **Components**: unknown ### Implementation Plan - **Effort**: medium - **Steps**: *This issue has been triaged and marked for implementation.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#71848