Bug 505676

Summary: Previews not shown for images with wrong extension
Product: [Applications] dolphin Reporter: Douglas Silva <doug.hs>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: minor CC: doug.hs, kdedev, kfm-devel
Priority: NOR    
Version First Reported In: 25.04.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Dolphin window showing a missing preview image
Gwenview showing the expected thumbnails

Description Douglas Silva 2025-06-17 02:46:38 UTC
Created attachment 182315 [details]
Dolphin window showing a missing preview image

SUMMARY
I happen to have a lot of WebP images with an incorrect file extension ".jpg", which were downloaded online. They're too many, and I would probably have to write a script to fix them.

Note that Gwenview (in Browse mode) does show the preview as expected; Thunar (Xfce) and Nautilus (GNOME) can also display the thumbnails in these cases. Unfortunately, Dolphin cannot. So I was wondering if it could just disregard the [incorrect] file extension and rely on the MIME type alone?

After all, we will inevitably going to download images like this every once and a while — the internet is full of them. Since it's possible to make it easier for the user, why not? Other popular file managers are doing it.

Related reports:
- https://forum.manjaro.org/t/dolphin-thumbnails-not-generated-for-images-with-incorrect-extensions/61458
- https://forums.opensuse.org/t/thumbnails-not-working-for-images-with-incorrect-extensions/104464
- https://bugs.kde.org/show_bug.cgi?id=351035

STEPS TO REPRODUCE
1. Download this webp example: https://www.gstatic.com/webp/gallery/1.webp — it comes from https://developers.google.com/speed/webp/gallery1
2. Rename it to "1.jpg" (in my screenshots you'll see I used "2.jpg", but that's OK)
3. Hit F5 (probably not needed) and look at the image preview

OBSERVED RESULT
Dolphin doesn't show a preview for the image.

EXPECTED RESULT
Display previews for images named with the wrong extension.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Fedora Linux 42 KDE Plasma Desktop Edition (kernel 6.14.9-300.fc42.x86_64 64-bit)
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION
Graphics Platform: Wayland
Comment 1 Douglas Silva 2025-06-17 02:47:44 UTC
Created attachment 182316 [details]
Gwenview showing the expected thumbnails
Comment 2 TraceyC 2025-06-19 18:32:53 UTC
Thanks for the bug report. This was reported in bug 499241. Please follow that report for updates. Thanks!

*** This bug has been marked as a duplicate of bug 499241 ***