Use Python to visualize images in your terminal

Kevin Tewouda
4 min readAug 15, 2024

Meet term-image and termvisage projects

Photo by Mathieu Stern on Unsplash

While working on generative AI, I recently came across a nice little project for visualizing the images I was generating in the terminal, called term-image. In this little tutorial, I’ll show you how to use it in your command line projects. It’s nothing particularly useful, but it’s cool!

Installation

To install term-image, you will need Python 3.7 or higher.

$ pip install term-image

# or with poetry
$ poetry add term-image

# or with uv
$ uv pip install term-image

Usage

Let’s say for our example that we want to browse a folder and select a file to view in the terminal. We will use the questionary package, so you can also install it in your environment. If you…

--

--

Kevin Tewouda

Déserteur camerounais résidant désormais en France. Passionné de programmation, sport, de cinéma et mangas. J’écris en français et en anglais dû à mes origines.