Original link: https://blog.kelu.org/tech/2023/08/04/displaying-images-in-the-linux-command-line.html

Some pictures are stored on the server, and it is troublesome without preview.
To be able to preview on the command line, a prerequisite is that the terminal supports Sixel Graphics. Like I use iTerm2, there is no problem with the server-side preview. But if you enter tmux, it will not work.
-
Install ImageMagick
Ubuntu/Debian
sudo apt-get install imagemagickmacOS
brew install imagemagick -
install lsix
wget https://raw.githubusercontent.com/hackerb9/lsix/master/lsix sudo mv lsix /usr/local/bin sudo chmod +x /usr/local/bin/lsix -
use
lsix
If the terminal or server does not support it, it will be displayed as follows:

This article is transferred from: https://blog.kelu.org/tech/2023/08/04/displaying-images-in-the-linux-command-line.html
This site is only for collection, and the copyright belongs to the original author.