Install webp codec in Image Viewer

I have a Librem 5 with PureOS and am trying to install the webp codec in Image Viewer. I did not find anything in the PureOS repositories so I checked online. I found that there was an apt repo for Ubuntu but I’d rather not install a possibly conflicting repository to my phone. I then found a procedure to install manually but it didn’t work when I tried it.

Any way that other users have this working? Thanks!

These linked instructions are pretty bad and an easy way to make a mess in your system…

Debian bullseye did not have webp-pixbuf-loader package, so byzantium does not have it either. Debian bookworm has it though, so the next version of PureOS will have it as well.

However, the bookworm’s package builds from source just fine on byzantium.

sudo apt install git-buildpackage
dpkg-source -x webp-pixbuf-loader_0.2.1-1.dsc
cd webp-pixbuf-loader-0.2.1/
sudo apt build-dep .
dpkg-buildpackage --no-sign
sudo apt install ../webp-pixbuf-loader_0.2.1-1_arm64.deb

Thank you @dos, this works. Just to note for completeness I had to enter the primary mirror for pbuilder as when I installed git-buildpackage.

Also, I can’t assign the file type to Image Viewer by default. When I go to Default Applications in the Settings the only entry is ‘Images’, which already has Image Viewer as the selected app. I will have to do some more research to figure out how to get webp types to be considered images.