I love using feh to organise my image collections. I've set the actions to move the current image to a certain directory, but when trying to open gifs, feh doesn't animate them.

Therefore I was searching a lightweight image/gif viewer with the possibility to execute commands with simple key strokes like --action in feh.

Thank you

I've found a program that might be good enough. It's called gifview and it's an old version of gifsicle; you can get it by installing gifsicle. The really interesting option is -w where you specify the window to open the gifs (so you can make all go to the same acting pretty much like feh), it still doesn't accept command inputs but it's close enough.

  • 2
    If you have imagemagick installed, you can run animate -loop 0 file.gif Commented Oct 2, 2014 at 6:43

4 Answers 4


Try sxiv with the -animate flag.

sxiv -a

Simple X Image Viewer

The primary goal of sxiv is to create an image viewer, which only has the most basic features required for fast image viewing (the ones I want). It has vi key bindings and works nicely with tiling window managers. Its code base should be kept small and clean to make it easy for you to dig into it and customize it for your needs.


Another lightweight image viewer that seemed to come preinstalled on my Ubuntu device is Eye of Gnome (eog). It supports GIF animation out of the box and has a (very) small number of commands that can be performed with shortcut keys.


Depends on what you mean by light weight, lol. Based on your love of feh I suggest you look at gifsicle


home page - http://www.lcdf.org/gifsicle/

man page - http://www.lcdf.org/gifsicle/man.html

I am not sure if gifsicle will display the image.

You might try displaying the image with your browser.


It seems that there is no program that can do such thing... so I decided to make my own script, goes as follows (using feh and gifview) :

while read i; do
    file+=( "$i" )
done < <(ls | sort -R)

for i in $(seq 0 "${#file[@]}");do
    if [[ "${file[$i]}" =~ .*.gif ]];then
        gifview -a "${file[$i]}"
        read -s -n 1 choice
        case $choice in
            1)    //Command to execute//
            2)    //Other Command to execute//
        feh -rqzZFVY --cycle-once --action1 "//Comand to execute//" --action2 "//Other command to execute// "${file[$i]}"

The script first loads the files into the array file, then it loops through those files with the for loop. if the file is a gif the first conditional is triggered, then a read command gets the option you want to do with the file and executes the command under the case option, else it executes feh

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .