fetch renders images directly in the terminal.
Control how images are rendered:
| Value | Description |
|---|---|
auto |
Try optimal terminal protocol with built-in decoders (default) |
external |
Allow external adapters for additional formats |
off |
Disable image rendering |
fetch --image external example.com/photo.avif
fetch --image off example.com/image.pngThese formats are decoded without external tools:
- JPEG -
.jpg,.jpeg - PNG -
.png - TIFF -
.tiff,.tif - WebP -
.webp
If you set --image external, fetch supports these additional formats when
the necessary tools are installed:
- AVIF -
.avif - HEIF/HEIC -
.heif,.heic - GIF -
.gif(static frame) - BMP -
.bmp
The installed adapters can support other formats.
fetch detects the terminal and selects the first applicable image protocol.
Supported terminals: Kitty, Ghostty, Konsole
The highest quality protocol with full color support and efficient transmission.
Supported terminals: iTerm2, WezTerm, Hyper, Mintty
Base64-encoded PNG images displayed inline.
Supported terminals: All terminals
Fallback rendering using Unicode block characters (▀▄█). Works everywhere but with reduced resolution.
fetch detects your terminal emulator through environment variables:
| Terminal | Detection Method |
|---|---|
| Kitty | KITTY_PID or TERM=xterm-kitty |
| Ghostty | GHOSTTY_BIN_DIR or TERM=xterm-ghostty |
| iTerm2 | ITERM_SESSION_ID or TERM_PROGRAM=iTerm.app |
| WezTerm | WEZTERM_EXECUTABLE or TERM_PROGRAM=WezTerm |
| Konsole | KONSOLE_VERSION |
| Hyper | TERM_PROGRAM=Hyper |
| Mintty | TERM_PROGRAM=mintty |
| VS Code | TERM_PROGRAM=vscode or VSCODE_INJECTION |
| Windows Terminal | WT_SESSION |
| Apple Terminal | TERM_PROGRAM=Apple_Terminal |
| Alacritty | TERM=alacritty |
| Zellij | ZELLIJ |
| tmux | TERM_PROGRAM=tmux |
If the built-in decoders do not support an image format, set --image external. fetch tries these external tools in the specified order:
Fast image processing library.
# Install on macOS
brew install vips
# Install on Ubuntu/Debian
apt install libvips-toolsComprehensive image manipulation tool.
# Install on macOS
brew install imagemagick
# Install on Ubuntu/Debian
apt install imagemagickMultimedia framework with image support.
# Install on macOS
brew install ffmpeg
# Install on Ubuntu/Debian
apt install ffmpegSet image rendering preferences in your configuration file:
# Disable image rendering
image = off
# Auto-detect terminal protocol with built-in decoders (default)
image = auto
# Opt in to external adapters
image = externalfetch resizes images to a maximum of 80% of the terminal height. It keeps the
image aspect ratio.
fetch example.com/photo.jpgfetch -o photo.jpg example.com/photo.jpgfetch --image off example.com/image.jpg- Check terminal support: Not all terminals support inline images
- Verify format: Built-in decoders handle JPEG, PNG, TIFF, and WebP by default
- Install adapters: Install VIPS, ImageMagick, or FFmpeg and use
--image externalfor more formats - Check the terminal size: Increase the size if the image does not render.
- Use a native-protocol terminal: Kitty, Ghostty, and iTerm2 give the highest quality.
- Check image dimensions:
fetchresizes large images. - Block character fallback: Quality is limited with Unicode blocks
- Terminal color support: Make sure that the terminal supports 24-bit color.
- tmux or screen: Test without the terminal multiplexer because it can reduce the color depth.
- Try default decoding:
--image auto
fetch limits images to 8192 x 8192 pixels to prevent memory problems. It
reports a dimensions are too large error for larger images.
- Animated GIFs:
fetchdisplays only the first frame. - Maximum size: The limit is 8192 x 8192 pixels.
- Memory limit:
fetchloads images into memory for processing. - Terminal multiplexers: tmux and screen can interfere with image protocols.
- CLI Reference - Image option details
- Output Formatting - Other content type handling
- Configuration - Default image settings