Dear Diary: How to enable webp previews in Ubuntu 22.04
I find myself needing to work with .webp files a lot recently. The default file browser (Nautilus) in Ubuntu 22.04 does not have previews.
Enable webp previews
To change that you can install webp-pixbuf-loader. As always, adding a 3rd party repo is risky, so think about whether you want to do it.
sudo add-apt-repository ppa:helkaluin/webp-pixbuf-loader
sudo apt update
sudo apt install webp-pixbuf-loader
For me, this enabled webp previews instantly, even without having to close Nautilus.
Source: https://www.omglinux.com/see-webp-images-in-nautilus-and-other-gtk-apps/
Change default webp viewer
Now I have previews, but when opening wepb files they add a new Chrome tab every time. It turns out, the inbuilt file viewer (eog) in Ubuntu 22.04 can already handle webp files. Your just have to:
- Right click a webp file
- Select Properties
- Select the "Open With" tab
- Select "Image Viewer"
- In the bottom right, click "Set as default"
Now, when double clicking a webp file, it should open in the image viewer, just like your png and jpg files.