Skip to content
Image previews using Überzug for Vifm (vi file manager)
Branch: master
Clone or download

Latest commit

cirala Merge pull request #8 from sdushantha/font-preview
 Added support for previewing font files (.ttf, .oft, etc)
Latest commit b5cc2bd Apr 3, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE first commit Mar 3, 2019 added links to the prerequistes Mar 10, 2020
screenshot.png first commit Mar 3, 2019
vifmimg Added support for previewing font files (.ttf, .oft, etc) Mar 10, 2020
vifmrun sanity check and arguments passed along Mar 7, 2020

Image previews using Überzug for vifm (vi file manager)


This script is used along vifm to generate image previews for various file types in vifm.

If you want image preview support for lf check out cirala/lfimg.

The script is currently able to handle the following formats:

  • Video files
  • eBook files
  • Images and icons
  • Audio files
  • Font files

Video previews are also supported by using ffmpegthumbnailer and works very well but just like the PDF previews there is a minor flash between each preview, this is due to ffmpegthumbnailer generating the preview file.

GIF files are as of now in the works, it works but in order to break out of the animation loop the user needs to hit the CTRL-C. Sometimes this breaks the preview entirely. When resizing the terminal window the animation replays. There is room for improvement here.

PDF/epub preview is also supported, this is done via pdftoppm and epub-thumbnailer and works almost flawlessly, a minor flash between the previews occur due to pdftoppm generating the image.

Ico files are supported and is utilizing ImageMagick.


  1. Copy the vifmimg and vifmrun scripts to a folder that is included in your $PATH variable for easy access to the files.

  2. Edit your ~/.config/vifm/vifmrc file and add fileviewer properties like so:

    fileviewer *.pdf
        \ vifmimg pdfpreview %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

    fileviewer *.epub
        \ vifmimg epubpreview %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

    fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
        \ vifmimg videopreview %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

    fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm
        \ vifmimg draw %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

    fileviewer *.gif
        \ vifmimg gifpreview %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

    fileviewer *.ico
        \ vifmimg magickpreview %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear
    fileviewer <audio/*>
        \ vifmimg audio %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear
    fileviewer <font/*>
        \ vifmimg font %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

You will also need to add these keybindings (preferably in the bottom of your vifmrc) in order to get the PDF scrolling functionalities:

    map > :!vifmimg inc<CR>
    map < :!vifmimg dec<CR>
  1. In order to launch Vifm with image preview from now you'll need to use the supplied vifmrun script



  • Seebye for creating Überzug and the initial script that this script is heavily based upon.
  • Ranger's approach to file previewing as an inspiration source.
You can’t perform that action at this time.