Ollama Vision Model (llava) Fails to Read Images? Text Model, Base64 Shape & Images Field Diagnosis Guide

2026-11-24 | GPU Repair | 33 minutes | HK GPU Fix Editorial Team

Ollama Vision Model (llava) Fails to Read Images? Text Model, Base64 Shape & Images Field Diagnosis Guide

Key takeaway

When Ollama cannot read an image, the fault is one of three things: a text-only model was asked to read it, the base64 string has the wrong shape, or the images field sits in the wrong layer of the request. Three comparisons — a different model, a different base64 shape, and a field position — separate the three layers.

Introduction

A picture is sent to Ollama with a simple question — "What is in this image?" — and the answer comes back wrong. Sometimes the server refuses outright with an HTTP 400 error. Sometimes there is no error at all, and the model answers as if no picture had ever been sent. Sometimes it describes something that is not in the picture at all. The text questions on the same machine work fine, so the server is running and the model is loaded. Something narrower has gone wrong, and it sits in the gap between the picture and the model.

That gap has three parts, and they fail in different ways. First, the model itself has to be able to read pictures at all: a vision model is a text model plus a vision encoder, and a text-only model has no such encoder. Second, the picture has to arrive in the shape Ollama expects: a bare base64 string inside the `images` field, not a data URL, not a file name, not a web address. Third, the `images` field has to sit in the right layer of the request: at the top level for `/api/generate`, inside each message for `/api/chat`. Get any one of the three wrong and the picture never reaches the model — but each one fails with a different signature, and each signature points at a different test.

This guide explains how those three parts work, how to prove which one failed, and how to avoid the mistakes that make the diagnosis look confusing. It is a diagnostic guide for one narrow shape: Ollama answering a picture question wrongly while text questions on the same machine work normally. If the server cannot be reached at all, if the model will not load, or if the answer stops halfway through, different articles apply, and the boundary section near the end says which ones.

Symptom definition: what counts as this problem

This article covers one narrow shape. All three of the following must be true; if any one is missing, the problem belongs somewhere else.

First, the same picture, sent to Ollama with a question about its contents, gets an answer that does not describe what is in the picture. There are three shapes of this failure. (a) An outright refusal: HTTP 400 with an explicit error message, such as `{"error":"Multimodal data provided, but model does not support multimodal requests."}` or `{"error":"illegal base64 data at input byte 4"}`. (b) A silent wrong answer: no error, but the reply never mentions anything in the picture, as if no picture had been received. (c) An unrelated answer: the model describes the wrong picture or invents details that are not there — misreading a chart number or hallucinating fine detail, which the boundary table treats as a capability limit of a small model rather than a fault.

Second, plain text questions work normally. On the same machine, against the same server, a question with no picture attached gets a good answer. That proves the server is running and the model is loaded, so the problem is not in the connection layer (article #565) or the loading layer (articles #552 and #556).

Third, the two failure shapes — an error and a silent wrong answer — have to be kept apart, because they are measured in completely different ways. When the server refuses, the error message itself is evidence (tests T1 and T2). When it answers silently, there is no error message, and only a comparison test can separate the cause (test T3). The two shapes must never be mixed together in one test.

These three shapes need to be kept apart because each one is measured differently. A connection that fails is the route in article #565 (bind address, listening socket, firewall). A model that loads but runs on the CPU is the route in article #556 (the `num_gpu` layer count). An answer that stops halfway is the route in article #566 (`num_predict` and stop sequences). A tool call that does not work is the route in article #570 in the same batch (the `tools` field, not the `images` field — the same tool, a different API field). This article is about the remaining shape: a picture question answered wrongly after the connection has already succeeded.

Five layers of mechanism

Reading a picture in Ollama is not "a text model plus a picture". Three things have to be in place at once, and the official Ollama API documentation, coder000, and botserv.de all agree on them. The details below come from the sources listed at the end of this article.

Layer one: the model capability layer — a text model, not a vision model (a main subject of this article). A vision model is a text model plus a vision encoder (also called a projector): the picture first passes through the encoder and becomes tokens, and those tokens go into the model together with the text. A text-only model has no such encoder at all — hand it a picture and it cannot accept it, so the server refuses outright: `{"error":"Multimodal data provided, but model does not support multimodal requests."}`. coder000 states it plainly: the message means "The image string decoded, but the model named in the request takes text only." The most common example is asking `qwen2.5:0.5b` (text-only) to read a picture; the vision version of the same family, `qwen2.5vl:3b`, answers it (verified by howtodoinjava). The evidence for this layer is test T1. Across the whole article library, "llava" appears zero times in either language, "Multimodal data" appears zero times in either language, and the Chinese term for a vision model appears zero times — all re-counted for this article from the article data, case-sensitive and case-insensitive (see the library scan section).

Layer two: the base64 shape layer — a data: prefix, a file name, or a URL handed over as base64 (a main subject of this article). Each element of the `images` array is the base64 string of the picture file's own bytes — not a data URL beginning `data:image/png;base64,`, not a file name (`red.png`), and not a URL. Ollama does not download a picture from a URL by itself; botserv.de states it directly: "Ollama cannot download images directly from public URLs. Your application must fetch the image and encode it to Base64". When the string is not bare base64, the server fails to decode it and refuses with `{"error":"illegal base64 data at input byte 4"}` (for a data: prefix) or `input byte 3` (for a file name). The evidence for this layer is test T2. Across the whole article library, "illegal base64" and "data:image" appear zero times in either language, and "base64" itself appears zero times in either language — all re-counted for this article.

Layer three: the field position layer — `images` placed in the wrong layer of the endpoint (a main subject of this article). There are two endpoints and two positions. The official API documentation states them separately: for `/api/generate`, `images` sits at the top level of the request — "a list of base64-encoded images (for multimodal models such as `llava`)"; for `/api/chat`, `images` sits inside each message — "a list of images to include in the message (for multimodal models such as `llava`)". Put it in the wrong place and the server says nothing at all — it simply treats the request as if there were no picture and answers with text alone (see test T3). The evidence for this layer is test T3. The generic word "images" does appear in other articles, but only in picture, vBIOS-image, or image-generation contexts — never as the Ollama `images` field; the Chinese data contains "images" only in article #567, in a ComfyUI black-image context, not an Ollama one.

Layer four: the picture content layer — the picture is too small, the text in it is too small, or the model itself misses a detail (a boundary, not a main subject). The picture is fine, the writing is correct, and the model is a vision model — but the model still misses a detail: small text cannot be read (the internal resize limit of 336×336 or 672×672 pixels, verified by dev.to), small models such as Moondream and llava 7B miss fine text, misread chart numbers, and sometimes invent details (dev.to). The evidence is an auxiliary observation (the crop comparison). This layer is a capability limit, not a fault — the article states it plainly so that "missed a detail" is not written up as the same kind of failure as "could not read the picture".

Layer five: the server and loading layer — the model does not load, runs on the CPU, or runs out of memory (a boundary, not a main subject). A model that does not load at all (article #552), one that loads but runs on the CPU (article #556), one that unloads after a while (article #555), or an inference out-of-memory error (articles #552 and #553) — all of these are problems that appear before any picture is read, not in the picture-reading layer. The boundary table below lists them. This article states the point plainly: if plain text questions fail too, do not use the seven steps here — follow articles #565, #556, or #552 instead.

The mechanism leads to one key distinction: "fails to read images" is not one cause, it is three variables — whether the model can read pictures, whether the base64 is written correctly, and where the `images` field sits. Each variable has its own test, and each test's variable and outcome variable are different.

Which vision models exist — and why this article gives no fixed list

Which models can read pictures changes with the Ollama version. botserv.de lists five (llava, llava-llama3, bakllava, moondream, granite3.2-vision); a list compiled during batch 212 named seven more (Llama 3.2 Vision, Qwen2.5-VL, Qwen3-VL, MiniCPM-V, Gemma 3, Llama 4, Mistral Small 3.1); dev.to names LLaVA, Gemma 3, Moondream, and Llama 3.2 Vision. None of these is wrong — the list itself moves. This article therefore gives no fixed list: readers should check their own version's library tags or the output of `ollama show` for the model in question, and should not treat any list in print as permanent.

How a picture is resized inside the model

A vision model resizes pictures internally to 336×336 or 672×672 pixels (verified by dev.to). Text in the picture that is smaller than that resolution allows is lost before the model ever sees it. That is a capability limit, not a fault: the remedy is to crop the picture to the part that matters and ask again, not to keep re-sending the same full picture.

Seven-step diagnosis

  1. Characterise the shape. Which kind of "cannot read" is it: an outright refusal (go to step 2 and read the error message) or a silent wrong answer (go to step 4 and check the field position)? If plain text questions fail too, this is not the present article — follow articles #565, #556, or #552.
  2. Read the error message. `Multimodal data provided...` points at the model capability layer — run test T1. `illegal base64 data at input byte N` points at the base64 shape layer — run test T2, and read the byte number: it tells you where the first wrong character sits.
  3. Compare models. Ask the same picture and the same question twice — once with the suspected model, once with `llava` (test T1). If llava answers what is in the picture and the suspected model refuses with the Multimodal error, change to a vision model, and record which model is text-only and which is vision.
  4. Compare base64 shapes. Try the same picture in three writings with the same vision model — bare base64, a `data:` prefix, and a file name (test T2). If bare base64 works, the prefix fails at byte 4, and the file name fails at byte 3, the writing is wrong — use bare base64.
  5. Compare field positions. Try the same vision model, picture, and question in three placements — `/api/generate` with `images` at the top level, `/api/chat` with `images` inside the message, and `/api/chat` with `images` at the top level in the wrong place (test T3). If the misplaced one answers silently with text alone, move `images` back to the correct layer.
  6. Compare picture contents (auxiliary). If small text cannot be read, crop the picture larger and ask again: if the cropped version reads, the internal resize limit (336×336 or 672×672) is the cause, not a fault.
  7. Stop. If all three tests still do not separate the cause, record five things — the model name, the `ollama show` output, the request JSON (with the `images` field position), the full error message, and the picture file size — and bring those notes to a check. Do not reinstall Ollama or reinstall the model one after another: reinstalling cannot change whether a model can read pictures.

Three decisive tests

Each test changes exactly one variable and watches one outcome. Use the same picture, the same question, and the same model (except where the model itself is the variable) for every run, and judge by what the model answers about the picture — not by whether the request returned HTTP 200, because a misplaced `images` field also returns 200.

T1: Vision model against text model comparison — the same picture and the same question, the suspected model against llava

Ask the same picture and the same question (for example, "What is in this image?") twice: first with the suspected model (for example, `qwen2.5:0.5b`), then with `llava`, changing nothing else. Write the model name in full — `qwen2.5:0.5b` against `qwen2.5vl:3b` are the same family with a different suffix, and that one `vl` is the difference between text-only and vision (verified by howtodoinjava).

Why this test is new: "llava", "Multimodal data", "does not support multimodal", "multimodal", and the Chinese terms for a vision model and for failing to read a picture all appear zero times in either language across the whole article library (re-counted for this article, case-sensitive and case-insensitive). Article #556 is the only neighbour that ever mentions a vision projector, and it does so in one sentence about VRAM reservation — "for a model with a vision projector, reserve the projector size plus 1 GiB" — not as a picture-reading diagnosis; its variable is the `num_gpu` layer count and its outcome is "runs on the CPU or runs on the GPU", while T1's variable is "which model" and its outcome is "the Multimodal refusal or an answer about the picture". Article #179 discusses quantisation levels and buying a card with enough memory, never which model can read a picture. Article #566 discusses `/api/chat` parameters (`num_predict`, stop sequences), and never mentions the `images` field.

T2: Base64 shape comparison — the same picture, bare base64 against a data: prefix against a file name

Try the same picture in three writings, one after another, with the same vision model (for example, llava): (a) bare base64 — the base64 of the file's own bytes, with no prefix at all; (b) a `data:image/png;base64,` prefix followed by the same bare base64; (c) the file name `red.png`.

Why this test is new: "illegal base64", "data:image", and "base64" itself all appear zero times in either language across the whole article library (re-counted for this article, case-sensitive and case-insensitive). coder000 verified that the same data URL fails at byte 4 on both `/api/chat` and `/api/generate` — the base64 check is the same on both endpoints, so T2 does not need to be run twice, once per endpoint. No neighbouring article teaches reading a base64 error from its byte number.

T3: Images field position comparison — the same request, `/api/generate` top level against `/api/chat` inside the message against `/api/chat` top level (misplaced)

Use the same vision model, the same picture, and the same question, in three placements: (a) `/api/generate`, with `images` at the top level of the request; (b) `/api/chat`, with `images` inside the message; (c) `/api/chat`, with `images` at the top level of the request — the misplaced form.

Why this test is new: the Ollama `images` field appears zero times in the article library as a field (re-counted for this article; the generic word "images" occurs in 31 English articles, but every occurrence is in a picture, vBIOS-image, or image-generation context — never as the Ollama API field — and the Chinese data contains "images" only in article #567, in a ComfyUI black-image context). The official API documentation states the two endpoint positions separately (see the mechanism section). Article #566 discusses `/api/chat` parameters (`num_predict`, stop, stream) and never mentions the `images` field; article #565 discusses bind addresses and never discusses request contents. T3's variable is "which layer `images` sits in" and its outcome is "whether the model answers what is in the picture" — no neighbouring article has that variable combination.

Auxiliary observations

These are useful supporting observations. They are deliberately not counted among the three decisive tests.

The CLI `--image` quick check. `ollama run llava "What's in this image?" --image ./screenshot.png` — the command line turns the file name into base64 by itself; the API does not. If the CLI works and the API does not, the problem is in the string sent to the API, not in the model. It is deliberately not counted among the three tests: it is only another writing of T2's variable (the CLI does the encoding for the reader), not an independent variable.

The Open WebUI refusal message. Open WebUI's message "Selected model(s) do not support image inputs" is an interface-level refusal, not a server error — when the model itself has no vision capability switched on, the interface blocks the send. It is deliberately not counted among the three tests: it is only the interface version of T1's variable, not an independent test.

The crop comparison (picture content layer). When small text cannot be read, crop the picture larger and keep only the part that matters, then ask again: if the cropped version reads, the internal resize limit (336×336 or 672×672) is the cause, not a fault; if it still cannot be read, go back to tests T1 and T2. It is deliberately not counted among the three tests: it targets a capability limit, not the location of a picture-reading failure.

The three tests, in one table

TestVariable changedOutcome variableWhat a positive result means
T1: suspected model vs llavaWhich model is usedMultimodal refusal vs answer about the pictureModel capability layer is the cause
T2: bare base64 vs data: prefix vs file nameShape of the string inside `images`Success vs `illegal base64` refusal, with byte numberBase64 shape layer is the cause
T3: `/api/generate` top level vs `/api/chat` inside message vs `/api/chat` top level (misplaced)Which layer `images` sits inModel answers about the picture or notField position layer is the cause
Auxiliary: CLI `--image`Whether the CLI does the encodingCLI works vs API failsProblem is in the string sent to the API
Auxiliary: Open WebUI refusalInterface-level model check"Selected model(s) do not support image inputs"Model has no vision capability switched on
Auxiliary: crop comparisonSize of the picture region sentSmall text reads after cropping or notInternal resize limit, not a fault

Common misconceptions

  1. "The model says it cannot see the picture, so the picture file must be broken." Wrong. The most common cause is that the model itself is a text-only model — run test T1 first, and do not start by suspecting the picture file.
  2. "If the base64 is wrong, the server will tell me where it is wrong." Half wrong. The byte number only tells you where the first wrong character sits (character 4 is the colon, character 3 is the dot) — it does not tell you whether the input was a data: prefix or a file name. The reader has to match the byte number against the input.
  3. "`data:image/png;base64,` is the standard writing, so it works everywhere." Wrong. Browsers and OpenAI use data URLs; Ollama wants bare base64. Carrying the data URL writing over to Ollama is exactly what produces the byte 4 error.
  4. "`images` works wherever it is placed — the server knows how to find it." Wrong. Placed in the wrong layer, the server silently treats the request as if there were no picture and never reports an error — the silent wrong answer is itself the evidence, and test T3 is needed.
  5. "A bigger vision model will read the picture more clearly." Not necessarily. The main cause of unreadable small text is the internal resize limit of 336×336 or 672×672 pixels — changing to a bigger model does not necessarily fix it; cropping the picture does.
  6. "`ollama run llava` works, so the API must work too." Wrong. The command line turns a file name into base64 by itself; the API requires the reader to encode bare base64. The two routes are different, and command-line experience cannot be carried over to the API directly.

Boundary cases: what this article is not

SituationWhich route appliesWhy it is not this article
Cannot reach the Ollama API (localhost:11434 gives no reply)#565Connection layer — picture reading only begins after the connection succeeds
Model loads but runs on the CPU, graphics card idle#556`num_gpu` layer count, not the picture-reading layer
Model unloads after a while, needs reloading on every question#555`keep_alive` lifecycle, not the picture-reading layer
Model does not load at all, or inference runs out of memory#552 / #553Allocator and budget layer, not the picture-reading layer
Answer stops halfway through (truncated)#566Generation parameter layer — reached only after the connection succeeds and the model can read the picture
Tool call does not work (model cannot use tools)#570 (same batch)The `tools` field, not the `images` field — the same tool, a different API field
Text inside the picture is wanted as extracted text through OCROpen WebUI RAG settingsText in a picture never goes through OCR — only a vision model can read it (Open WebUI documentation); OCR is a different route
Audio or video input (sending a wav or mp4 file to the model)Not Ollama picture readingllama.cpp accepts only `image/*`; audio returns HTTP 500 (verified by smfclearinghouse) — a framework boundary, not a picture-reading failure
Small model misses details, misreads chart numbers, invents detailsCapability limitVerified by dev.to: Moondream and llava 7B miss fine text and invent details; this is model capability, not a fault — the remedy is cropping or a larger model
Picture reading is slow, but it does answer#555 T6 / #562Speed layer, not whether the picture can be read

Neighbour articles and the boundary map

This article is #569, and its companion in the same batch is #570, which covers an Ollama tool call that does not work. The two share a batch and a diagnostic style — five layers, seven steps, decisive tests — but nothing else: one is the `images` field for picture reading, the other is the `tools` field for tool calls, and they share no test, no variable, and no outcome.

The closest neighbours, read closely. Article #556 is the Ollama runs-on-CPU article. It covers the `num_gpu` layer count, VRAM reservation, and scheduler behaviour. Its variable is the layer count and its outcome is "runs on the CPU or runs on the GPU" — a loading question, not a picture-reading question. Its only mention of a vision projector is a single sentence about reserving memory ("for a model with a vision projector, reserve the projector size plus 1 GiB"), and its English version contains none of "llava", "images", "base64", "Multimodal", or "vision" at all. Article #565 is the Ollama API connection article: bind address, listening socket, firewall, client URL. Its variable is "which address, which machine" and its outcome is "can it connect" — it never discusses request contents, and it contains zero occurrences of "llava", "images", and "base64" in either language. Article #566 is the truncation article: `num_predict`, stop sequences, client timeout. Its variable is the generation stopping rule and its outcome is the truncation point — it never mentions the `images` field, and it contains zero occurrences of "llava", "images", "base64", and "Multimodal" in either language. Article #555 is the lifecycle article (keep_alive, parallel requests, loading limits) and contains zero occurrences of "llava" and "images". Article #554 is the Docker article (container runtime, device pass-through) and contains zero occurrences of "llava" and "images". Article #179 is the local-AI memory-planning article: quantisation levels and whether a card has enough memory before purchase — a planning calculation, not a run-time picture-reading diagnosis. Article #561 is the faster-whisper article: device, `compute_type`, and model size — and "base64" never appears in it at all.

The library scan. Across the whole article library, re-counted for this article from the article data: "llava" appears zero times in either language, case-sensitive and case-insensitive; "Multimodal data" appears zero times in either language; "illegal base64" appears zero times in either language; "data:image" appears zero times in either language; "base64" itself appears zero times in either language, case-sensitive and case-insensitive; "multimodal" appears zero times in English, case-sensitive and case-insensitive; "does not support multimodal" appears zero times in English; "ollama vision" appears zero times in English; the Chinese terms for a vision model, for failing to read a picture, for "Ollama reads pictures", for multimodal, and for vision support all appear zero times in Chinese. The phrase "vision model" appears twice as a plain substring in English (articles #186 and #508), but both are "television model" — a television model name, not a vision model — and with word-boundary matching the count is zero. The generic word "images" appears in 31 English articles, but every occurrence is in a picture, vBIOS-image, or image-generation context, never as the Ollama API field; the Chinese data contains "images" only in article #567, in a ComfyUI black-image context.

Sources and honesty gaps

The facts in this article come from the following sources, checked by search on 2026-11-24: the official Ollama API documentation, at https://raw.githubusercontent.com/ollama/ollama/main/docs/api.md, for the two endpoint positions (`/api/generate` top level — "a list of base64-encoded images (for multimodal models such as `llava`)"; `/api/chat` inside each message — "a list of images to include in the message (for multimodal models such as `llava`)") and for "To submit images to multimodal models such as `llava` or `bakllava`, provide a list of base64-encoded `images`"; coder000, "Ollama API: 'illegal base64 data at input byte 4' when sending an image", at https://www.coder000.com/post/ollama-api-illegal-base64-data-at-input-byte-image-data-url, for the byte 4 (data: prefix) and byte 3 (file name) errors, for "The byte number matches the position of the first character that is not a base64 character, counted from zero", for the same byte 4 result on both endpoints, for the follow-on Multimodal error from `qwen2.5:0.5b`, and for the PowerShell form `[Convert]::ToBase64String([IO.File]::ReadAllBytes("red.png"))`; coder000, "Ollama API: 'Multimodal data provided, but model does not support multimodal requests.'", for "The image string decoded, but the model named in the request takes text only. In the test it came from qwen2.5:0.5b; send the request to a model that accepts images."; botserv.de, "Ollama Vision API", at https://www.botserv.de/en/local-ai/local-ai-software/ollama/ollama-vision-api/, for the five-model list, for the `/api/chat` images example in bare base64, for "Ollama cannot download images directly from public URLs. Your application must fetch the image and encode it to Base64", and for the 7B vision model Q4 figure of about 6–8 GB of VRAM; blog.codercops.com, "Running LLMs Locally with Ollama", at https://blog.codercops.com/blog/running-local-llms-ollama-2026, for the CLI form `ollama run llava "What's in this image?" --image ./screenshot.png` and for an API `images` example inside a message; dev.to (benracicot), "Using LLaVA With Ollama on Mac - Without the Base64 Encoding", at https://dev.to/benracicot/using-llava-with-ollama-on-mac-without-the-base64-encoding-3656, for "Smaller models miss details. Moondream and even LLaVA 7B will miss fine text in screenshots, misread chart numbers, sometimes hallucinate details" and for "Vision models resize images internally to 336x336 or 672x672 pixels. Fine details below that resolution are lost. Crop to the relevant portion before sending."; howtodoinjava, "Spring AI Multimodality: Send Images to a Chat Model", at https://howtodoinjava.com/spring-ai/spring-ai-multimodality/, for "The ordinary *qwen2.5:3b* model used elsewhere in OrderDesk is text-only", for the vision version `qwen2.5vl:3b` (about 3.2 GB), and for "Check image-input support for the specific model, not just the provider."; and the Open WebUI RAG troubleshooting documentation, for "An image attached in a chat is sent to the model as an image. It never goes through the content extraction engine, so no OCR runs on it… Only a vision model can read it." and for "`Multimodal data provided, but model does not support multimodal requests.` That text comes from the model server, not from Open WebUI."

Three honesty gaps must be stated plainly. First, there was no local reproduction: no Ollama vision model was run on a local machine for this article, so the two error messages, the byte numbers, and the two endpoint field positions all come from the external sources listed above; coder000's figures come from one Windows 11 machine, one Ollama version (0.40.14), and one 8×8 test picture — on a different version or a different model the error text may differ, so this article describes the comparison design and does not fix a single version's output format as absolute. Second, the list of which models can read pictures moves with the version, so this article gives no fixed list and readers must check their own version's library tags or `ollama show` output. Third, the vision model VRAM figure (7B Q4, about 6–8 GB) is botserv.de's figure, not a measured one; different quantisation levels and different context sizes will change it. Two source conflicts were handled by stating the scope rather than picking a side: the model lists differ between sources, so this article gives no fixed list; and the CLI accepts a file name while the API does not, which is an interface difference, not a source conflict, so this article writes the two routes separately and does not carry command-line experience over to the API.

Frequently asked questions

Is the model broken?

No. A model that cannot read pictures is most commonly a text-only model being asked to do a vision job — it has no vision encoder, so the server refuses with `{"error":"Multimodal data provided, but model does not support multimodal requests."}`. A broken model usually reports a different kind of failure, such as failing to load at all. Run test T1: ask the same picture and the same question with `llava`. If llava answers what is in the picture and the suspected model refuses, change to a vision model and record which model is text-only and which is vision.

What does "illegal base64 data at input byte 4" mean, and why byte 4 and not somewhere else?

It means the string inside `images` is not bare base64, and the server stopped at the first character that is not a base64 character, counted from zero. A `data:image/png;base64,` prefix fails at byte 4 because the colon in `data:image/png` sits at character 4. A file name such as `red.png` fails at byte 3 because the dot sits at character 3. The byte number tells you where the first wrong character is — it does not tell you whether the input was a prefix or a file name, so match the number against what was sent. The remedy is bare base64: the base64 of the picture file's own bytes, with no prefix. That is test T2.

The request returns no error, but the model answers as if there were no picture. What happened?

The `images` field is almost certainly in the wrong layer of the request. The server silently ignores a top-level field it does not recognise, so a misplaced `images` field produces no error — the request still returns HTTP 200, and the model answers from the text alone. `/api/generate` wants `images` at the top level of the request; `/api/chat` wants `images` inside each message. Run test T3: send the same picture and question in all three placements and compare which ones answer what is in the picture.

`ollama run llava` works with `--image`, so why does my API call fail?

The command line and the API are two different routes. `ollama run llava "What's in this image?" --image ./screenshot.png` accepts a file name because the CLI turns it into base64 by itself. The API does not do that step: it requires the caller to encode the picture into bare base64 and put that string in the `images` field. A file name sent to the API fails at byte 3, and a data URL fails at byte 4. Command-line experience cannot be carried over to the API directly — run test T2 with the exact string the API receives.

The model answers, but it misses small text or misreads chart numbers. Is that the same failure?

No. That is a capability limit, not a picture-reading failure. Vision models resize pictures internally to 336×336 or 672×672 pixels, so text smaller than that resolution allows is lost before the model sees it, and small models such as Moondream and llava 7B miss fine text, misread chart numbers, and sometimes invent details. Crop the picture to the part that matters and ask again: if the cropped version reads, the resize limit was the cause. Changing to a bigger model does not necessarily fix it.

Which models can read pictures — is there a fixed list I can rely on?

There is no fixed list to rely on, because the list moves with the Ollama version. Different sources name different sets — llava, llava-llama3, bakllava, moondream, granite3.2-vision in one list, with Llama 3.2 Vision, Qwen2.5-VL, Qwen3-VL, MiniCPM-V, Gemma 3, Llama 4, and Mistral Small 3.1 added in another — and none of them is wrong. Check the model in question against the library tags for the reader's own version, or the output of `ollama show`. Also check the specific model, not just the provider: `qwen2.5:0.5b` is text-only while `qwen2.5vl:3b` is the vision version of the same family.

I have run all three tests and still cannot separate the cause. What now?

Record five things — the model name, the `ollama show` output, the request JSON (with the `images` field position), the full error message, and the picture file size — and bring those notes to a check. Do not reinstall Ollama or reinstall the model one after another — reinstalling cannot change whether a model can read pictures. If there is a hardware suspicion (for example, the machine itself is unstable, or the graphics card behaves abnormally during local inference), the machine can be taken to the workshop for a further check.

Conclusion

An Ollama picture question answered wrongly is a three-variable problem with a fixed shape: text questions work, the picture question does not, and the failure is either an outright refusal or a silent answer that never mentions the picture. The three comparisons in this article — a different model, a different base64 shape, and a different field position — separate the model capability layer, the base64 shape layer, and the field position layer, with what the model says about the picture as the only judge, and each one changes exactly one variable on the same picture and the same question. The byte number in the base64 error is evidence, not noise; the silence of a misplaced field is evidence too; and a missed detail is kept honest as a capability limit, fixed by cropping, not by re-sending the same picture.

When to seek professional help: if the model will not load, if the graphics card is not detected, or if all three tests fail to separate the cause — or if the machine crashes during local inference — the problem is no longer a request field. It may involve the driver, the installation, or the hardware itself, and is worth having checked by a technician.

If the tests point to a hardware fault rather than a setting — the card is not detected, the machine crashes, or local inference fails with an error that no setting changes — the card and the setup can be checked at the Shek Mun workshop: Dali Plaza, Room 1209, Shek Mun, Hong Kong. Phone 2186 8010, WhatsApp 6558 6806. Diagnosis and repair pricing follows the workshop's published three-tier range of HK$400–HK$2,800, quoted before any work begins.

Related articles

Related services

If you need Chip-level GPU repair, see these service pages: