Archives For November 30, 1999

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.

WebP thumbnail & default image viewer support

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

libreoffice-thumbnail

Nautilus file browser doesn’t generate thumbnail images for WebP files, LibreOffice Documents, and animated GIFs (maybe) by default.

Thanks to atareao team, some simple extensions has been created with that Ubuntu displays thumbnail images for these file formats in Nautilus.

WebP is a image format that provides lossless and lossy compression for images on the web. It is currently developed by Google, based on technology acquired with the purchase of On2 Technologies. more…

Here are the screenshots in my Ubuntu 15.04 desktop:

Before

Before

GIF, WebP thumbnails

After

To install these extensions, go to the developer’s PPA page:

Thumbnailers for GIF, WebP, LibreOffice Docs

Scroll down and click package links and download the xxxthumbnailer_xxx.deb packages from expanded pages (Work on Ubuntu 14.04 though they’re built against 15.04).

Finally install these three .deb packages by clicking on each of them to open with Ubuntu Software Center and click the install button.

To apply changes, remove the thumbnail caches and restart Nautilus by running below commands one by one:

rm ~/.cache/thumbnails/fail/gnome-thumbnail-factory/*
rm ~/.cache/thumbnails/large/*
rm ~/.cache/thumbnails/normal/*
nautilus -q

remove-thumbnail-cache

Finally start Nautilus browser and see result.

via