# Terminal images (/docs/v0.4/using/images)



Programs running in a koshi pane can draw terminal images. koshi decodes the
image stream, keeps the image at its cell placement, and renders it in every
attached terminal that can show images.

## Supported protocols [#supported-protocols]

Each terminal probes its own capabilities when it attaches. koshi chooses the
first supported protocol in this order:

| Priority | Protocol                | Terminal sequence       |
| -------- | ----------------------- | ----------------------- |
| 1        | Kitty graphics protocol | Kitty graphics commands |
| 2        | iTerm2                  | OSC 1337 inline images  |
| 3        | DEC Sixel               | Sixel raster data       |

The choice belongs to the terminal, not the session. Two terminals attached to
the same session can therefore use different protocols.

## Image placement [#image-placement]

Koshi keeps an image at its cell placement through scrolling, scrollback,
resizing, and screen switches. A terminal that supports none of the protocols
shows `terminal image unavailable` in the cells the image covers.

If a terminal does not answer the cell-size query, koshi uses its window pixel
size to scale Sixel and iTerm2 images.

## Disable native image output [#disable-native-image-output]

Native image output is enabled by default. Set `image-support` in your
terminal's `koshi.kdl` to disable it:

```kdl title="koshi.kdl"
version 1
image-support #false
```

With the setting off, koshi keeps the text and image placeholders, but sends no
native image bytes. See [`koshi.kdl`](/docs/v0.4/configuration/koshi-kdl).
