Skip to content

Image Preview

This tutorial will teach you how to use superfile’s image preview feature step by step.

superfile supports image previews directly in your terminal using several display protocols. When supported, images can be shown inline without any external viewer.


superfile automatically detects your terminal using the $TERM and $TERM_PROGRAM environment variables. We support rendering on the following terminals:

TerminalProtocolImage Preview Support
kittyKitty protocol
WezTermKitty protocol
GhosttyKitty protocol
iTerm2Inline images
KonsoleInline images
VSCodeInline images
TabbyInline images
HyperInline images
MinttyInline images
footSixel graphics
Black BoxSixel graphics

✅ means full support for inline image preview using Kitty protocol
❌ means image preview is currently not supported


superfile supports the following rendering protocols and will automatically choose the best one based on your terminal:

Protocol NameDescriptionStatus
Kitty protocolMost capable, pixel-accurate rendering with transparency and scaling support.✅ Preferred
SixelOld standard used in DEC terminals and some modern ones like foot.
iTerm2 inlineiTerm2’s proprietary image format, used in Tabby, Hyper, etc.
ANSIFallback text rendering using ANSI blocks or metadata only.✅ Always

superfile detects terminal capabilities by inspecting:

  • $TERM
  • $TERM_PROGRAM

These variables help us decide whether advanced rendering might be possible. However, real support is confirmed at runtime using terminal queries.

To scale images correctly, superfile sends the following escape code:

\x1b[16t

This sequence queries the terminal for the size of each cell in pixels. superfile uses the result to:

  • Maintain correct image aspect ratio
  • Avoid distortions in previews
  • Adapt to terminal resizes

If your terminal does not support \x1b[16t, we fallback to default assumptions like 10×20 px per cell.

When advanced image preview isn’t supported (for example, when the terminal doesn’t support the Kitty protocol), superfile gracefully falls back to an ANSI-based preview using color-coded blocks.

This ensures a consistent and reliable experience across all terminal environments.