How to Display Images on Raspbian Command Line with fim


UPDATE: Unfortunately fim has been dropped from the Debian repository and as a result is no longer available in the latest version of Raspbian. Take a look at How to Display Images on Raspbian Command Line with fbi instead.

If you are using your Pi to capture images using the camera it can be useful to display those images without launching a desktop environment. One of the ways of doing this is to use a utility called “fim”.

fim is based on an image viewer called “fbi” and stands for “Fbi IMproved”.

Note : It uses the system’s framebuffer to display images directly from the command line. For this reason it is best used when your Pi is directly connected to a monitor and keyboard.

Install fim

To install fim use the following commands :

sudo apt-get update
sudo apt-get -y install fim

Use fim

To display a single image with the “auto-zoom” option use :

fim -a example.jpg

Once displayed you can use various keyboard shortcuts to manipulate the image such as the r/R key to rotate :

fim rotated example photo

To display all the images in the current directory  use the following command :

fim -a *.jpg

The PageUp/PageDown keys can be used to cycle through the images selected by the “*.jpg” filter.


If you use the “-t” option you can render the image in ASCII characters.

To display the image as ASCII art you can use :

fim -a -t example.jpg
fim Ascii Art Example

Do or do not. There is no try.

OK so the last one is slightly less useful but might provide some light relief from the command line!

Keyboard Controls

While the image is displayed you can use the following keys :

PageUp/Down      Prev/Next image
+/-              Zoom in/out
a                Autoscale
w                Fit to width
h                Fit to height
j/k              Pan down/up
f/m              flip/mirror
R/r              Rotate 10 degrees CW/CCW
ESC/q            Quit


  1. I missed that section where you point out fbi, so please ignore my earlier post. I using the following script called by rc.local on startup to show a slideshow of all image found on the first attached usb drive.

    #Create the mount point if it does not exist
    if [ ! -d /mnt/usb ];
    echo Creating mount point
    mkdir -p /mnt/usb
    echo Found existing mount point
    #Mount the device onto the mount point.
    if [ -b /dev/sda1 ]
    echo Mounting usb device
    mount /dev/sda1 /mnt/usb 2>&1 >/dev/null
    #Start the slideshow
    if [ "$(ls -A /mnt/usb)" ]
    echo Starting slideshow
    /usr/bin/fbi -m 1280x1024-75 -t 3 -a /mnt/usb/*.JPG
    echo USB device not found. Resume normal operation

  2. Hi, is there a way to set up a slideshow using fim? Or even set a time limit for displaying a particular pic? Suggestions for accomplishing the same using other packages are also welcome. Thanks.

  3. FIM seems to be missing from the current (as of June 2016) Raspbian packages and can’t be installed with apt-get as suggested in this article.

  4. Hi.. i’m running FBI on raspbian lite and it works fine except it only loads the first 12 images..
    the images are on a remote nfs share, i dont know is thats the problem,
    but its mounted to /nfs/frame and all the images show up in ls

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.