Manjaro KDE brings an old annoyance back from the grave… I say old because I had this exact issue in openSUSE too but it was fixed over an year ago there. Essentially Dolphin will refuse to generate thumbnails for images that have the wrong extension, notably png files called filename.jpg or vice-versa. It’s common for png’s to have the jpg extension and jpg’s to have the png extension, especially when downloading images from the internet as many websites assign incorrect extension to graphics. For this reason and to avoid previews missing on such files, the thumbnailer needs to look at the MIME type instead of the file extension. I’d ensure the same thing happens for videos too, so if a mp4 is called avi the thumbnail generator doesn’t error out on it.
Thanks but this doesn’t concern Manjaro but KDE, so you should report it upstream https://bugs.kde.org. If you want to propose a workaround on the other hand it should be clear and easy to follow by everyone.
It might be due to how KDE components are configured by default. Especially since like I said, openSUSE had this problem too but fixed it, same KDE versions and components installed. I don’t know the technical details behind what causes it though… mentioning for others who may know what can be done OS side or if anyone is aware of a workaround in the meantime.
Have you installed kdegraphics-thumbnailers?
I’m trying to recreate this, and clearing my entire .cache/thumbnails directory each time. Dolphin always correctly generates a thumbnail preview regardless of what file extension I rename a true JPEG or PNG. Even if I rename a true JPEG image from “sample.jpg” to “sample.fake”, it still correctly creates a new thumbnail for sample.fake.
Here is my relevant system info:
Operating System: Manjaro Linux
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.10.23-1-MANJARO
Graphics Processor: GeForce GTX 1650/PCIe/SSE2
I have installed (by default?) kdegraphics-thumbnailers 20.12.3-1, so maybe that’s why it’s working fine on my system? I would think it’s a default package when selecting the KDE desktop during the installation setup.
In that case it may be an issue on my end. And yes, kdegraphics-thumbnailers is installed, the proper services and previews seem to be enabled in the Dolphin settings as well.
I just saw something that may explain this issue: In Dolphin - Settings - General - Previews the option “Skip previews for local files above” is set to 3MB. That’s very low! Perhaps it got reset by the new installation? I’ll bump it above something sensible like 16MB and see if the problem persists.
I can reproduce if I rename a foobar.png to foobar.jpg and refresh on my side but don’t know if it always has been this way or not.
Eureka! We might have narrowed it down! Before I submit a bug report to upstream KDE, can you confirm one thing for me?
What if you rename this foobar.png to foobar.fake?
I’m suspecting this is specific for renaming a true PNG to a .jpg extension. Since when I rename my sample.png to sample.fake, it generates a thumbnail with no issues.
UPDATE to my above bold text: I can reproduce it 100% when renaming any true PNG or BMP file to either .jpg or .jpeg, so now I suspect there’s some sort of conflict with the two different thumbnailer engines (generic images of BMP, GIF, PNG versus JPEG images which might also contain EXIF rotation data).
Renaming a BMP or PNG image to either .jpg or .jpeg might cause KDE’s thumbnailer to take a shortcut and attempt to treat it as an actual JPEG.
For a png image:
- Calling it filename.png works obviously.
- Calling it filename.jpg breaks, the thumbnail disappears and won’t get generated.
- Calling it filename.fake also works, the thumbnail gets generated if I use a false extension.
It seems the main cause was that 3MB limit, no idea how it got set but I cleared it and now I see missing thumbnails much more rarely. There’s an issue with mismatched extensions too though.
Probably this, renaming to foobar.fake doesn’t affect the thumbnail, one could even rename it plain foobar and it still works.
3 MB is the default in Manjaro, I guess for more speed/responsiveness for people that are on HDD, I use 5 MB nevertheless with a SSD, not unlimited.
Makes sense then. Funny that Manjaro overrode the setting despite me porting my home directory from openSUSE where it should have already been set.
3 MB is painfully low; I would advice defaulting it to at least 8MB. I set it to unlimited since I never needed this cap in the past, I’m happy with how it works now.
I think from the three of us we’ve pretty much narrowed down what’s going on and why files with the extension .jpg or .jpeg will not generate/display thumbnails if they are not real JPEG images.
I’m going to submit a bug report to upstream KDE with all of this information.
If non-JPEG images have their thumbnails generated because of their MIME type (regardless of filename extension), then the same should apply to JPEG images with the incorrect filename extension: it should be based on their MIME type and not .jpg / .jpeg extension.
Even then it is an issue for the webmaster of such site.
It is quite normal for applications to refuse to render files which has the wrong extension but if you still think it is a serious issue you should - as noted above - submit the issue to the Dolphin bugtracker.
I can vouch for this being an issue and this is frustrating me as a new Manjaro KDE Plasma user.
Sometimes unless I have .png for example after the filename (even though under properties its already identified as a PNG), the system doesn’t generate previews for the icons unless I explicitly specify the extension after the filename.