inline-images
See the pictures in your Claude Code transcript.

inline-images is a mod for Claude Code. Many command-line tools print images with the iTerm2 inline images protocol: imgcat, it2cat, chafa -f iterm, timg -p iterm, wezterm imgcat, matplotlib backends and more. Claude Code does not show these images. You see "Ran 1 shell command", and the model reads a wall of base64.
This mod shows each image under the tool call that printed it. It also shows the images that Claude sends to you. It draws the Mermaid diagrams that Claude writes, Wardley maps included. And it draws 3D models (STL, OBJ, 3MF and PLY) from four sides.
| Without the mod | With the mod |
|---|
 |  |
The picture on the right is a real iTerm2 image, at full resolution, inside a running Claude Code session.

In iTerm2 each picture comes in as a block preview, then the real image replaces it.
Contents
Quick start
-
Install the mod. Type this in a Claude Code session:
/plugin install inline-images --marketplace chrisns/claude-image-cli-mod
Answer y to add the marketplace. Then choose a scope.
-
Install Pillow, the image library that the mod uses:
python3 -m pip install Pillow
-
For real pixels in iTerm2, do two more steps:
- Run
python3 -m pip install iterm2.
- In iTerm2, open Settings > General > Magic and select Enable Python API.
-
Test it. Ask Claude:
Download https://raw.githubusercontent.com/chrisns/claude-image-cli-mod/main/docs/fixtures/earth.jpg and show it with imgcat.
If you do not have imgcat, this command prints the same sequence:
printf '\033]1337;File=inline=1:%s\a\n' "$(base64 < earth.jpg | tr -d '\n')"
You see the Earth under the Bash call, with a caption such as earth.jpg · 800×800 · JPEG · 141.6 KB.
Features
- Previews in the transcript. Each image appears under the tool call that printed it, with its name, size and format.
- Real pixels. iTerm2, WezTerm, kitty and Ghostty show the real image. Other terminals show a preview in coloured blocks.
- Images that Claude sends. An image file that Claude delivers with
SendUserFile or SendUserMessage appears under the delivery. See it.
- 3D models. Claude can show you an STL, OBJ, 3MF or PLY file from four sides, and it sees the same picture, so it can check the model it made. See it.
- Diagrams. Claude can draw Mermaid diagrams: flowcharts, sequence diagrams, ER diagrams, Gantt charts, mind maps, Wardley maps and more. Each one appears as a picture in Claude's reply. See them.
- Click to open. Click a picture to open it in your system's viewer, for example Preview on macOS.
- A clean context. The model reads
[inline image: earth.jpg, 141.6 KB, data left out; the user sees a preview if their terminal can draw it], not 190,000 characters of base64.
- Large images. Claude Code cuts tool output at 30,000 characters. The mod reads the whole output from the file where Claude Code saves it.
- The right shape. The mod measures your terminal's cell size and keeps the picture's aspect ratio.
- The whole protocol.
File=, chunked MultipartFile, the tmux passthrough wrapper, the BEL and ST terminators, width, height and preserveAspectRatio. A download (inline=0) is not shown, and its note says so.
- Animations. An animated GIF, WebP or PNG plays: natively in iTerm2 and WezTerm, frame by frame in kitty, Ghostty and the block preview. See how.
- Transparency and several images in one command.
Diagrams
Ask Claude for a diagram, and it draws one. The mod tells Claude that it can, and how to write a Wardley map:

Every Mermaid diagram type works. These four came from four one-line requests: