Fixing WebP and AVIF support on CachyOS with LXQt

If you’ve landed on CachyOS with the LXQt desktop and found that .webp or .avif images aren’t opening, showing thumbnails, or are being misidentified by the file manager — you’re not alone. Neither format works fully out of the box. Here’s how to fix both in one go.


The problem

CachyOS LXQt ships without the codec plugins needed for WebP and AVIF. Symptoms include:

  • PCManFM-Qt shows no thumbnails for .webp or .avif files
  • Double-clicking them does nothing, or the wrong app opens
  • file --mime-type returns something incorrect like application/octet-stream
  • LXImage-Qt and KolourPaint refuse to open AVIF files entirely

The fix

Step 1 — Install the required packages

Run this single command to install everything needed for both formats:

sudo pacman -S qt5-imageformats qt6-imageformats kimageformats libavif libwebp

What each package does:

  • qt5-imageformats / qt6-imageformats — adds WebP (and TIFF, etc.) support to Qt applications including PCManFM-Qt and LXImage-Qt
  • kimageformats — KDE’s extended image plugin library; adds AVIF support to any Qt app, including LXImage-Qt and KolourPaint
  • libavif — the underlying AVIF codec (required by kimageformats for AVIF)
  • libwebp — the underlying WebP codec

Note on AVIF: Neither qt5-imageformats nor qt6-imageformats includes AVIF. That support comes exclusively from kimageformats + libavif. LXImage-Qt and KolourPaint have no native AVIF support on their own — they depend entirely on this plugin being present.


Step 2 — Update the MIME database

This ensures the system correctly identifies .webp and .avif files by type:

sudo update-mime-database /usr/share/mime

Step 3 — Set default applications

Tell the system which app to use when you double-click these files:

xdg-mime default lximage-qt.desktop image/webp
xdg-mime default lximage-qt.desktop image/avif

Alternatively, right-click a file in PCManFM-Qt → Open With → select LXImage-Qt → check Set as default.


Step 4 — Log out and back in

PCManFM-Qt needs a full restart to pick up the new plugins and begin generating thumbnails. A log out/in is the most reliable way to do this, or you can restart the desktop component via LXQt Session Settings → Desktop.


Verifying it worked

Check MIME type recognition:

file --mime-type yourimage.webp
# Should return: image/webp

file --mime-type yourimage.avif
# Should return: image/avif

Check the AVIF plugin is loaded:

ls /usr/lib/qt6/plugins/imageformats/ | grep avif
# Should show: kimg_avif.so

Check default app assignments:

xdg-mime query default image/webp
xdg-mime query default image/avif
# Both should return: lximage-qt.desktop

Why KolourPaint and LXImage-Qt don’t support AVIF natively

Both apps delegate all image format handling to Qt’s plugin system — they don’t bundle their own codecs. WebP support arrives via qt6-imageformats, but AVIF was never added to that package. Instead, AVIF landed in KDE’s kimageformats library in early 2021. Because kimageformats registers itself as a standard Qt image plugin, any Qt application on the system — including non-KDE ones like LXImage-Qt and KolourPaint — automatically gains AVIF support once it’s installed alongside libavif.


Quick feference

FormatViewer/ThumbnailsKey Package
WebPPCManFM-Qt, LXImage-Qt, KolourPaintqt6-imageformats
AVIFPCManFM-Qt, LXImage-Qt, KolourPaintkimageformats + libavif

Tested on CachyOS with LXQt desktop (Arch-based). The same fix applies to other Arch-based distributions using LXQt.

Leave a Comment

Licensed under CC BY-NC 4.0

DevOps viewpoints are those of its owner. You may share and adapt this article for non-commercial purposes, provided proper attribution is given. Attribution should include:

Title: Fixing WebP and AVIF support on CachyOS with LXQt
Author: peter arthur martin
Original URL: https://www.woodcentral.com/-/peter/fixing-webp-and-avif-support-on-cachyos-with-lxqt/
License: CC BY-NC 4.0

Site Index

👍 This page answered my questions

Your vote helps other woodworkers quickly find the answers and techniques that actually work in the shop.