Skip to main content
Yazi provides built-in image preview support across a wide range of terminal emulators through multiple image protocols. It automatically detects your terminal and selects the best available protocol.

Supported Protocols

Yazi implements several image protocols to maximize terminal compatibility:
  • Kitty Graphics Protocol (KGP) - Modern unicode placeholders for efficient image rendering
  • Kitty Old Protocol - Legacy Kitty graphics protocol for older versions
  • Inline Images Protocol (IIP) - iTerm2-style inline images
  • Sixel - Classic sixel graphics format with wide support
  • Überzug++ - Window system protocol for X11/Wayland
  • Chafa - ASCII art fallback using Unicode blocks

Terminal Compatibility

How It Works

Yazi’s image adapter system automatically:
  1. Detects your terminal using environment variables and capability queries
  2. Selects the best protocol from the compatibility list
  3. Handles image processing including decoding, resizing, and color management
  4. Manages image state for smooth preview updates
The implementation is in yazi-adapter/src/adapter.rs:88:

Image Processing

Yazi includes built-in image decoding and processing capabilities:

Pre-caching

Images are pre-cached and optimized before display:

Downscaling

Images are automatically downscaled to fit the preview area while respecting configured limits.

Configuration

Configure image preview behavior in your yazi.toml:

Special Considerations

Tmux Support

Yazi automatically detects and handles Tmux by wrapping escape sequences:

WSL Support

Windows Subsystem for Linux is automatically detected and handled appropriately.

Color Management

Yazi supports ICC color profiles for accurate color reproduction when available.

External Dependencies

Überzug++

For X11 and Wayland terminals without native protocol support:

Chafa

For ASCII art fallback (version 1.16.0 or higher):

Troubleshooting

No Images Showing

  1. Check terminal compatibility in the table above
  2. Verify image preview is enabled in config
  3. For Überzug++, ensure X11/Wayland is running
  4. Check file permissions on image files

Images at Wrong Size

Adjust max_width and max_height in configuration to match your terminal’s capabilities.

Poor Image Quality

Increase image_quality setting (higher = better quality, larger cache files).

Performance

Image preview is highly optimized:
  • Async decoding - Images decode in background threads
  • Pre-loading - Next images load before you navigate to them
  • Smart caching - Processed images cached to disk
  • Memory limits - Configurable bounds prevent excessive memory use
See Why is Yazi Fast? for architectural details.