Skip to main content

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

VariablePurpose
YAZI_FILE_ONEOverride 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
SettingDefaultDescription
max_width600Max preview width in pixels
max_height600Max preview height in pixels
image_filterlanczos3Resampling algorithm for scaling
image_quality75JPEG output quality (50–90)
image_delay0Debounce delay in ms

Filter Comparison

FilterQualityPerformance
nearestLowestFastest
triangleLowFast
catmull-romHighModerate
lanczos3HighestSlowest
tip

Use nearest on low-end hardware or when previewing many files. Use lanczos3 for crisp previews on high-DPI displays.

See Also