fetch can render images directly in your terminal when fetching image URLs.
Control how images are rendered:
| Value | Description |
|---|---|
auto |
Try optimal protocol, fallback to external tools (default) |
native |
Use only built-in decoders |
off |
Disable image rendering |
fetch --image native example.com/photo.jpg
fetch --image off example.com/image.pngThese formats are decoded without external tools:
- JPEG -
.jpg,.jpeg - PNG -
.png - TIFF -
.tiff,.tif - WebP -
.webp
When --image auto (default), these additional formats are supported if you have the required tools installed:
- AVIF -
.avif - HEIF/HEIC -
.heif,.heic - GIF -
.gif(static frame) - BMP -
.bmp - And many more...
fetch automatically detects your terminal and uses the best available 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 |
When native decoders can't handle an image format, fetch tries external tools in this 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
# Use only native decoders
image = native
# Auto-detect (default)
image = autoImages are automatically resized to fit within 80% of the terminal height while maintaining aspect ratio. This ensures images don't overwhelm the terminal display.
fetch example.com/photo.jpgfetch -o photo.jpg example.com/photo.jpgfetch --image native example.com/image.pngfetch --image off example.com/image.jpg- Check terminal support: Not all terminals support inline images
- Verify format: Use
--image nativeto test if it's a format issue - Install adapters: Install VIPS, ImageMagick, or FFmpeg for more formats
- Check terminal size: Very small terminals may not render properly
- Use a native protocol terminal: Kitty, Ghostty, or iTerm2 provide best quality
- Check image dimensions: Very large images are resized
- Block character fallback: Quality is limited with Unicode blocks
- Terminal color support: Ensure your terminal supports 24-bit color
- tmux/screen: May reduce color depth
- Try native decoding:
--image native
fetch limits images to 8192x8192 pixels maximum to prevent memory issues. Larger images will fail to decode with a "dimensions are too large" error.
- Animated GIFs: Only the first frame is displayed
- Maximum size: 8192x8192 pixels
- Memory limit: Images are loaded into memory for processing
- Terminal multiplexers: tmux and screen may interfere with image protocols
- CLI Reference - Image option details
- Output Formatting - Other content type handling
- Configuration - Default image settings