Last verified

Can Claude Code generate images?

No.
Not natively · it writes code that draws

No, not directly. We asked it to generate a PNG of a red circle and save it; no image appeared. What it did instead was offer to write a script that would draw one, then run it with your approval. That's the honest shape of the capability: it's a coding agent, so it produces the code that produces the picture. For reading images it points the other way — that part works.

No image produced in our run — nothing was written to disk No image model behind it — this is a coding tool It offered the real route — write a script, then run it Reading images works — tested separately, 9.7 s Running the script needs approval — two steps, not one
§ 01 / PROOF

We actually ran it.

Methodology →
TEST RUN · AUG 01, 2026 · CLI 2.1.170

Asked for a PNG, got an offer to write a script.

The prompt was deliberately unambiguous: generate a PNG of a red circle, save it as circle.png in this directory, and if you can't generate images, say so exactly. After 88 seconds the directory contained no circle.png. What came back was a choice of routes — write a gen_circle.py script first and run it after approval, or use a different language — followed by a request to approve the command.

Note what it did not do: claim an image had been created, or produce a description in place of one. It reached for the tool it actually has, which is writing and running code.

The counterpart result is worth putting next to it: reading an image works fine — it named the colour of a generated PNG in 9.7 seconds. Vision in, no generation out.

Prompt: generate + save a PNGImage produced: noneWhat it offered: write a script, then runElapsed: 88.6 sReading images: works — 9.7 s
$ claude -p "Generate a PNG of a red circle,
save as circle.png..."
- Have me write a gen_circle.py script first
and then run it (two approvals), or
- Use a different tool/language you'd prefer.
$ ls circle.png
no circle.png produced
$
§ 02 / WHY

What to do instead.

2.1
Ask for the generator, not the picture

The productive prompt is the one it offered itself: ask for a script. "Write a script that renders a red circle to circle.png and run it" gets you the file — via Python, Node, ImageMagick or whatever your machine has — plus something you can re-run and edit later.

For anything data-driven this is strictly better than an image model. A chart generated by code can be regenerated when the data changes; a picture can't.

2.2
Diagrams are text before they're pictures

Architecture diagrams, flowcharts and sequence diagrams have a text form — Mermaid, Graphviz, PlantUML — and that's where a coding agent is genuinely strong. Ask for the Mermaid source, keep it in the repository next to the code it describes, and let your docs pipeline render it.

The result reviews in a pull request like anything else, which no exported PNG ever manages.

2.3
If you want an actual image model

Then you want a different product. This is a coding agent with no image generation behind it, and no flag turns that on. What it can do is call one for you: connect an image-generation service through MCP and the agent can drive it as a tool — the generation still happens in that service, not here.

Frequently asked.

Quick follow-ups people search after this question.

Q · 01 Can Claude Code make a diagram for my README? +
Yes, as text. Ask for Mermaid or Graphviz source and keep it in the repo — it renders on GitHub and in most docs pipelines, and it reviews in a pull request. That's a better outcome than an exported image nobody can edit.
Q · 02 Why did it offer to write a script instead of just making the image? +
Because that's the capability it has. It's a coding agent with no image model behind it, so it reached for code — and asked permission before running anything, which is the normal behaviour for commands.
Q · 03 Can it edit an existing image? +
Not directly, by the same logic — but it can write and run a script that does (crop, resize, convert). We tested generation only; treat editing as the same shape of answer rather than a verified result.
Q · 04 Does Claude the chat app generate images? +
That's a separate product with separate capabilities, and this page is about the coding agent. Don't assume a capability transfers between the two — they share a name and a subscription, not a feature set.