Skip to content

image previews

rovr uses the textual-image package to render images directly in the terminal.

however, image support depends on the capabilities of your terminal emulator. different terminals support different image protocols.

here is a summary of terminals and their support for the image protocols used by rovr:

Terminal TGP support Sixel support iTerm2 support
Black Box
Foot
Gnome Terminal
Iterm2
Kitty
Konsole
Tmux
Visual Studio Code
Warp
Wezterm
Windows Console
Windows Terminal
Xterm

rovr includes its own iTerm2 Inline Image Protocol widget. With "Auto", it is selected automatically in a TTY when TERM_PROGRAM is iTerm2 or WezTerm.

if you are using a terminal that doesn’t support the default image protocol, textual-image will fall back to a half-cell representation.

if images do not appear correctly, you can manually override the image protocol in your config.toml file.

config.toml
[interface.image_viewer]
protocol = "Auto"

available protocol values are: "Auto", "TGP", "ITerm2", "Sixel", "Halfcell", and "Unicode".

this lets you configure the maximum width and height of image previews in pixels. by default, rovr sets these values to 1920 (width) and 1080 (height).

config.toml
[interface.image_viewer]
# used for all images
max_size = [4000, 4000]
[interface.font_preview]
# used for previewing fonts
max_size = [1000, 1000]
font_size = 50

when resampling, sometimes the image can appear pixelated. to solve this, you can set the image resampling to a higher type

config.toml
[interface.image_viewer]
resampling = "nearest" # lowest quality, you see pixels
resampling = "box" # similar to nearest
resampling = "bilinear" # recommended usually
resampling = "hamming"
resampling = "bicubic"
resampling = "lanczos" # best quality, but most time