The WebP image format, developed by Google, manages to yield incredibly small file sizes for pictures. This has made it the ideal format for web hosting, since websites can deliver images much more quickly. The problem is that many applications still can’t open WebP files.
In this tutorial, you will learn how to add WebP support to your image applications on Linux. We’ll also show how to install a dedicated application that can open WebP files.
Add Support for WebP
The webp-pixbuf-loader
library grants image viewing applications, such as Eye of GNOME (“Image Viewer” on Ubuntu), the ability to view WebP images.
Install webp-pixbuf-loader
on Ubuntu:
$ sudo add-apt-repository ppa:helkaluin/webp-pixbuf-loader $ sudo apt update $ sudo apt install webp-pixbuf-loader
Install webp-pixbuf-loader
on Fedora:
$ sudo dnf install webp-pixbuf-loader
Install webp-pixbuf-loader
on Manjaro or Arch Linux:
$ sudo pacman -S webp-pixbuf-loader
Once the installation is done, you should be able to open the WebP file with your ordinary image viewer. For example, right click on the WebP image file, select ‘Open With Other Application’, then look for and select ‘Image Viewer’.
Using gThumb software
If the library above didn’t work for your preferred image viewer, or you would like a dedicated application to open WebP images, you can use the gThumb software.
Install gThumb on Ubuntu:
$ sudo apt update $ sudo apt install gthumb
Install gThumb on Fedora:
$ sudo dnf install gthumb
Install gThumb on Manjaro or Arch Linux:
$ sudo pacman -S gthumb
After installation, you can open your WebP images with gThumb.
Converting WebP Files to JPEG and PNG
Your other option is to convert the WebP files to good old JPEG or PNG images. We can use the dwebp
command to convert WebP images.
First, install the dwebp
tool with the appropriate command below.
Ubuntu, Debian, and Linux Mint:
$ sudo apt install webp
Fedora:
$ sudo dnf install libwebp-tools
Arch Linux and Manjaro:
$ sudo pacman -S libwebp
Example 1. To convert WebP images to PNG:
$ dwebp image.webp -o image.png
Example 2. To convert WebP images to JPG:
$ dwebp image.webp -o image.jpg
For more examples on WebP conversion, see our tutorial on converting PNG/JPG images to/from WebP