Attach the picture to a vision model
Choose a vision-capable model and attach the actual image. A filename in an ordinary message gives a text-only model no picture to read. Ollama's app and CLI can handle image paths; its direct REST API expects base64 image data. See vision instructions.
You need an existing Ollama installation, a downloaded local vision model and a small PNG or JPEG that opens normally. Use the app for a quick question or the PowerShell example to save its answer.
1. Check the model
In a terminal, run:
ollama --version
ollama ls
ollama show YOUR_EXISTING_MODEL_TAG
Replace the placeholder with your complete model tag. Look for vision in its capabilities. The CLI guide covers listing and multimodal use; model details also exposes capabilities through POST /api/show.
For this local example, select downloaded weights and your own server. If unsure, use the local-or-cloud check before sending a private picture. If you need a new model, review its hardware, licence and download size first.
2. Ask through the app or terminal
In the Windows/macOS app, select your vision model and drag in the image. Confirm the attachment appears, then ask: “Describe the main objects. If text is unreadable, say so.” The app announcement covers compatible image models.
For the terminal, put image.png in your current folder and substitute your installed tag:
ollama run YOUR_EXISTING_MODEL_TAG "./image.png Describe the main objects."
Use a simple filename for the first check. The vision quick start shows this path-and-question format. If a download starts unexpectedly, cancel and recheck the tag. Copy the answer, or use the file export below.
3. Save the answer with PowerShell
Keep your local server available on its usual port, 11434. Open PowerShell in a separate working folder and paste the complete block. Enter the installed model tag and full image path without surrounding quotes; paths with spaces are supported.
$ErrorActionPreference = 'Stop'
$visionModel = (Read-Host 'Exact installed local vision model tag').Trim()
$visionPath = (Resolve-Path -LiteralPath (Read-Host 'Full image path')).ProviderPath
$visionOutput = Join-Path (Get-Location).Path 'ollama-image-answer.txt'
if (Test-Path -LiteralPath $visionOutput) {
throw 'Output exists. Choose a new working folder before another run.'
}
$visionApi = 'http://127.0.0.1:11434'
$visionModels = Invoke-RestMethod -UseBasicParsing -Uri "$visionApi/api/tags"
if (@($visionModels.models.name) -notcontains $visionModel) {
throw 'Exact model tag is not listed on this server.'
}
$visionShowBody = @{model = $visionModel} | ConvertTo-Json
$visionInfo = Invoke-RestMethod -UseBasicParsing -Method Post `
-Uri "$visionApi/api/show" -ContentType 'application/json; charset=utf-8' `
-Body $visionShowBody
if ($visionInfo.remote_host -or $visionInfo.remote_model) {
throw 'This entry advertises a remote model. Select local weights.'
}
if (@($visionInfo.capabilities) -notcontains 'vision') {
throw 'This model does not advertise vision support.'
}
$visionBytes = [System.IO.File]::ReadAllBytes($visionPath)
if ($visionBytes.Length -eq 0) { throw 'Image file is empty.' }
$visionBase64 = [Convert]::ToBase64String($visionBytes)
$visionBody = @{
model = $visionModel
stream = $false
messages = @(@{
role = 'user'
content = 'Describe the main objects. Say if text is unreadable.'
images = @($visionBase64)
})
} | ConvertTo-Json -Depth 8
$visionResult = Invoke-RestMethod -UseBasicParsing -Method Post `
-Uri "$visionApi/api/chat" -ContentType 'application/json; charset=utf-8' `
-Body $visionBody -TimeoutSec 300
if ($visionResult.done -ne $true -or
[string]::IsNullOrWhiteSpace($visionResult.message.content)) {
throw 'No complete text answer returned; inspect the response.'
}
$visionText = [System.Text.Encoding]::UTF8.GetBytes($visionResult.message.content)
$visionFile = [System.IO.File]::Open($visionOutput, [System.IO.FileMode]::CreateNew)
try { $visionFile.Write($visionText, 0, $visionText.Length) }
finally { $visionFile.Dispose() }
Get-Content -LiteralPath $visionOutput -Encoding UTF8
The script checks the server's model list, rejects advertised remote entries and looks for vision capability. The API source defines those remote fields. Check the app's active provider separately before sending private material.
It reads and encodes the image bytes, then sends them in images. Passing a path directly into the REST request would send the filename instead. Base64 is a data encoding, so choose the server destination with the same care as an ordinary image upload.
stream = false requests one JSON response; the chat API returns the answer in message.content. The script saves that text as UTF-8 and refuses to replace an existing export. Microsoft documents REST requests, base64 and file creation.
The request waits up to five minutes. If it times out, check the server and workload before retrying.
4. Open the saved answer
Open ollama-image-answer.txt in a text editor and compare the description with your picture. Check objects, names, numbers and any quoted text.
For tiny print, try a crop from the original-resolution image and keep both versions. A larger display of an already blurry picture will not recover missing detail.
Keep the image, answer, prompt, model tag and Ollama version together. For PDF text, use the extraction and OCR guide.
If the picture is not being read
- Connection refused: check the server and configured port before starting another instance. See the Windows guide.
- No model or no vision capability: check the exact tag; variants in the same family can support different inputs.
- Invalid image or base64: open the file and confirm you sent encoded image bytes. Keep the error; see API errors.
- Memory failure or timeout: use the memory checks, then retry after resolving the reported issue.
Local or hosted?
An installed local model uses your hardware without hosted inference charges. Ollama Cloud can suit a PC that struggles with the model, provided the selected hosted model supports images. Check the account allowance and plans before uploading. A hosted request sends the image to the provider, including when it passes through a local server.
Sources
Primary references checked 12 October 2026.