Image Preview Setup
Configure your terminal and Yazi for optimal image previews.
Per-Terminal Setup
Kitty
No extra configuration needed. Yazi auto-detects the Kitty protocol.
# Verify Kitty protocol works
printf '\e_Gi=1,s=1,v=1,a=q,t=d,f=24;AAAA\e\\'
Konsole (Sixel)
# Enable Sixel in Konsole
# Settings → Edit Current Profile → Terminal → Enable "Use Sixel images"
info
Konsole 22.04+ has stable Sixel support.
foot (Sixel)
# ~/.config/foot/foot.ini
[sixel]
max-width=1920
max-height=1080
tmux (All Terminals)
Add to ~/.tmux.conf:
set -g allow-passthrough on
Then reload tmux:
tmux source-file ~/.tmux.conf
Environment Variables
| Variable | Purpose |
|---|---|
YAZI_FILE_ONE | Override the file binary path used for MIME detection |
export YAZI_FILE_ONE=/usr/local/bin/file
Cache Management
Clear the Yazi cache (thumbnails, previews) with:
yazi --clear-cache
tip
Run yazi --clear-cache after upgrading Yazi or changing preview settings to regenerate stale thumbnails.
Preview Configuration (yazi.toml)
[preview]
max_width = 600
max_height = 600
# Resampling filter applied when scaling images
# Options: "nearest", "triangle", "catmull-rom", "lanczos3"
image_filter = "lanczos3"
# JPEG quality for image previews (50–90)
image_quality = 75
# Delay in ms before rendering previews (helps with fast scrolling)
image_delay = 0
| Setting | Default | Description |
|---|---|---|
max_width | 600 | Max preview width in pixels |
max_height | 600 | Max preview height in pixels |
image_filter | lanczos3 | Resampling algorithm for scaling |
image_quality | 75 | JPEG output quality (50–90) |
image_delay | 0 | Debounce delay in ms |
Filter Comparison
| Filter | Quality | Performance |
|---|---|---|
nearest | Lowest | Fastest |
triangle | Low | Fast |
catmull-rom | High | Moderate |
lanczos3 | Highest | Slowest |
tip
Use nearest on low-end hardware or when previewing many files. Use lanczos3 for crisp previews on high-DPI displays.
See Also
- Image Preview Protocols — protocol support matrix
- yazi.toml Reference — full config reference