Got some photo images in .webp
file format? Here’s how to open them with system default image viewer (and other GTK apps), and generate image thumbnail in File manager in Ubuntu 22.04 & Ubuntu 20.04
Webp is an image file format developed by Google. It supports both lossy and lossless compression, as well as animation and alpha transparency. The file format has smaller size while keeping good image quality.
You may view the WebP images in Linux via many applications, such as Firefox, Chrome and gThumb. But, that’s not enough! Files (aka nautilus file manager) does not show image thumbnail for webp, and image annotation tools may not open and save images in that file format.
So, this open-source library is present to deal with WebP support for GTK applications.
How to Install the Library:
The library has been made into some Linux’s own repository, including Arch, Fedora, and Manjaro. For Ubuntu user, you may either build it yourself or use this unofficial Ubuntu PPA.
UPDATE 1: Ubuntu 22.04 now includes the library in system repository. Just run apt install
command in step 3 to install it.
UPDATE 2: The PPA mentioned above uses auto-build feature and the 20.04 build is broken so far. So, I made another Ubuntu PPA for choice.
1. Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to add the PPA:
sudo add-apt-repository ppa:ubuntuhandbook1/webp-pixbuf-loader
Type user password (no asterisk feedback) when it asks and hit Enter to continue.
2. Linux Mint user needs to run command to update package cache, after adding PPA, which is done automatically in Ubuntu:
sudo apt update
3. Then, run the command to install the library:
sudo apt install webp-pixbuf-loader
In case the command above does not work for you, run sudo apt update
first to update cache.
After installation, you can now open WebP images or animations with default image viewer (aka, Eye of GNOME).
In case of you’ve previously opened it via anther image viewer (e.g., Firefox), right-click and go to file “Properties” dialog and set “Image Viewer” as default app to open it. So, you may then double-click to open WebP images.
And, some GTK apps (e.g., GIMP and Shutter screenshot tool) will now support for import/exporting WebP after app restart.
How to remove the library
For any reason, you can remove the library by opening terminal (Ctrl+Alt+T) and run command:
sudo apt remove webp-pixbuf-loader
And, remove the PPA either via “Software & Updates” utility under “Other Software” tab or by running command in terminal:
sudo add-apt-repository --remove ppa:helkaluin/webp-pixbuf-loader