Dolphin not correctly displaying thumbnail previews for images

I’m experiencing this very annoying problem where random images will not preview correctly in Dolphin. I looked through a couple of the older threads on this issue and nothing I tried seemed to help. I made sure the preview size is unlimited, I reset to the defaults and I rebooted my machine after trying each one as well. I’m not sure what to do. I’ve attached a screenshot of one of the folders. It does this in all windows, even when I’m uploading files. The preview for this screenshot didn’t even show up when I uploaded it. If anybody could help I would appreciate it.

Hi @DofHWvee
Yeah this was an issue before but should be solved by now.
Are these images without previews newly added maybe?
Have you set in:

  • Dolphin main menu > View > Set: Show previews

This setting is per folder.

F5 Refresh? Also delete the cache (I use Sweeper) and see what happens. Sometimes an image goes bad, just to be sure try and open them

Run the file command against some of those “errant” files, such as:

file IMG_20211021_075358.jpg

If it shows something other than the mimetype being “JPEG” (such as PNG, AVIF, or WEBP), then that explains the issue you’re facing.

Otherwise, we can rule this out for now and try something else.

They were showing up like this when I copied them from my old windows hard drive. That is, when I plugged in the external drive with my files, they looked like this. They didn’t do this on windows. The folder is set to show previews. I installed sweeper as well, no change.

I looked at the man page for the file command but I’m still a bit lost on the syntax to use it.

I did this as well. They aren’t bad. I had to open them individually to know where to sort them to after moving them to my new hard drive.

It’s simply,
file /path/to/filename.jpg

If you’re in the current directory that holds the image files,
file filename.jpg

That second option worked, thanks! It gave me this.

If it thinks it’s a different file format, how does one fix that?

Bingo. Just as I suspected. So rename those files to match the correct extensions. This will solve your thumbnail issue.

If it’s a PNG image, rename it to .png

If it’s a WebP image, rename it to .webp

And so on.

It worked! I have a LOT of files to rename haha. Thank you.

Is this a known bug in Dolphin, or is it windows messing things up and not translating it to other platforms correctly?

It’s not really Dolphin, per se, and it’s not really a “bug”.

There are three main “thumbnailer backends” the are responsible for generating thumbnail previews:

  • Generic (works on BMP, PNG, WEBP, etc)

  • JPEG / EXIF (specific for JPEG images)

  • FFmpeg (works on videos)

The problem is that the selection of which thumbnailer to use assumes that if a filename ends with a .jpg or .jpeg extension, then it must surely be an actual JPEG image. Thus, the JPEG / EXIF thumbnailer tries to generate a thumbnail and fails if the file is not a real JPEG image.

Why is there a JPEG specific thumbnailer? To leverage embedded thumbnails within the EXIF metadata (if they exist in the photo), which spares the CPU for the first time a thumbnail preview is generated.

Long story short, make sure to use the correct extensions in your filenames.

There’s a way you can make a simple shell script to do it for you. It would require some knowledge about for loops and the sed command.

EDIT: Okay, it wouldn’t really be “simple”, as it requires some script savvy.

Ahhh, I see. Strange, I almost never touch the file extension when saving anything.

I might do that eventually. It’s not urgent to get all the thumbnails working atm, just annoying. Thank you for all the help!

Just realized, since you’re using KDE, you might be in luck.

Because you can easily tell which files to rename (those without thumbnails), you can select them all and then right-click → Rename with KRename

KRename is a user-friendly method of doing bulk renames. Since you’re only loading a specific list files into KRename, it will work on those exact files. A simple replace operation of “replace .jpg with .png” will work. You’ll see a “before and after” preview on the bottom of the screen just to double-check before you commit the changes.

You might have to repeat this step again, but this time “replace .jpeg with .png”, on the off chance that some filenames end with .jpeg instead of .jpg.

The one caveat is that this assumes all these files are PNG (when in fact some might be WebP or AVIF.)

However, a WebP image with a .png filename extension will still invoke the “Generic thumbnailer”, which will make things appear to work properly anyways. :grin:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.