QT: Need help adding qtimageformats in dolphin & plasma

Hello. I want to use a animated desktop wallpaper. I installed a plasma extension https://store.kde.org/p/1339104/ (animated image wallpaper). The documentation say it should work on gif and webp, but I figured it only work for gif on my side (and gif are of really bad quality for a wallpaper). After some research I figured that :

  • This plugin use the build-in tool of KDE to read image.
  • The qtimageformats library provide support for webp (and some other formats)

I found that qtimageformats is not present in my QT_PLUGIN_PATH variable, and the dolphin wrapper script doesn’t add it. Howerer, a strange issue arise when I add qtimagesformats to the dependancies of dolphin, it add “export QT_PLUGIN_PATH=‘/nix/store/n3s010q5f9ql2w49r9m5gh21z9h2pbl3-qtimageformats-5.14.2/lib/qt-5.14.2/plugins’${QT_PLUGIN_PATH:+‘:’}$QT_PLUGIN_PATH” to the wrapper script. However, dolphin isn’t able to generate thumbnail for webp ( image thumbnail are enabled in the dolphin option, and it also use the build-in KDE tool for this ).

Can you help me with adding support of webp to the plasma desktop ? (also, maybe a way to declare global QT plugin in home-manager would be nice, but I think I can try to program that).

I actually found that while adding qtimageformats to the dolphin input, the wrapper isn’t enought, but adding

environment.variables = {
  "QT_PLUGIN_PATH" = "/nix/store/n3s010q5f9ql2w49r9m5gh21z9h2pbl3-qtimageformats-5.14.2/lib/qt-5.14.2/plugins";
};

actually make it work (for both plasma and dolphin). That’s actually pretty strange.