May 03

WebP support in ViewNior on Ubuntu Linux 20.04

Category: Linux,multimedia,Ubuntu   — Published by goeszen on May 3, 2021 at 1:42 pm

Recently I was fed up with viewnior and other image viewers not opening the increasingly popular WebP image file format brought to the world by Google. Every time the app suggested and fired up was GIMP, ... which is an

Running a recent Ubuntu 20.04 the solution is not to update viewnior (as discussed here) or any other library on the system, but to update the "loaders" of GDK pixbuf. pixbuf is a component of the stack that viewnior actually uses to open images, it's part of the GTK framework I think. No one knows the reason why these components haven't inlcuded WebP support already, but there's some user on github who released a "loader" for the WebP format. It has steps for Ubuntu, but I found them to be slightly different on Ubuntu 20.04:

$ sudo apt install meson libwebp-dev


$ cd webp-pixbuf-loader/

$ meson builddir -Dgdk_pixbuf_query_loaders_path=/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders

$ sudo ninja -C builddir install

If you compare the readme on the linked github repo, you'll notice that the search path gdk_pixbuf_query_loaders_path is different. Also note that the install/build script issues "/usr/bin/update-gdk-pixbuf-loaders --update-cache" so you don't have to. After that, viewnior and any other GDK/GTK viewer should open WebP images ok.

Leave a Reply