You are not logged in.

#1 2025-03-07 23:46:44

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

(SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

In Debian and Devuan, libheif is onboard, but that's not enough to enable support.

So I installed a couple of packages in Mate to get the picture viewer to work with .heic files, and also to generate thumbnails, heif-gdk-pixbuf and heif-thumbnailer, works great in Mate/Caja, but in Openbox viewing pictures works (gpicview) but thumbnails no joy in PcmanFM.

Searched a ton of links, some people say they've gotten it to work in PcmanFM, others say no way they could get it to work. And the folks that did get it to work don't seem to have done anything special or maybe they just didn't post any extra steps required.

Anybody here have any experience with this?

Last edited by greenjeans (2025-04-25 17:37:58)

Offline

#2 2025-03-08 00:30:19

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

^ The last time I used PCManFM was 7-8 years ago with Lubuntu (LXDE).

If I remember correctly, look at the PCManFM settings.
Sometimes you had to increase the thumbnail size (in MiB) if the format was supported.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#3 2025-03-08 08:04:43

ceeslans
Member
Registered: 2015-09-30
Posts: 195

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

Read somewhere some time ago that (as @marens already mentioned) the thumbnail size needs to be upped to the maximum in pcmanfm's preferences/display settings - which in my case is 32768 kb. That worked for me...

Last edited by ceeslans (2025-03-08 12:51:26)

Offline

#4 2025-03-08 08:25:58

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,737

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

ChatGPT has a little story that might be worth following
https://chatgpt.com/share/67cbfea1-0d08 … 58bd1206df

Offline

#5 2025-03-08 16:02:19

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

Well i'll be damned, I had seen somewhere the recommendation to up the thumbnail limit size, but had discarded that idea for a couple reasons:
1. Size limit never worked for me anyway, the default limit is 2 mb, but images 2-3 times that size always thumnailed anyway.
2. The test .heic image I was testing with yesterday, is smaller than the limit, about 1.3 mb.

But I went and increased the size limit to the max, and i'll be danged if it didn't pop up, takes a while which is kinda weird, also takes a while to load into the picture viewer.

The format may have awesome compression, but decompression speed is bad...always a trade-off when it comes to compression formats, there's always one fly in the ointment.

Gonna mark this solved and thanks so much, BL forum is my go-to now when nobody else seems to have an answer.

Cheers!

Offline

#6 2025-03-08 17:21:47

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

Sorry, one last thing I need to do, Mate/Caja is caching the thumbnails properly, but PcmanFM does not want to, so the thumbnail has to be regenerated every time you open a folder that has one in it.

I seem to remember there being some command to update maybe the mimetypes/file-types that get cached?

Offline

#7 2025-03-08 17:58:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

^ Close PCManFM and try to clear all thumnails cache.

$ rm -v -f ~/.cache/thumbnails/*/*.png ~/.thumbnails/*/*.png

$ rm -v -f ~/.cache/thumbnails/*/*/*.png ~/.thumbnails/*/*/*.png

Then open PCManFM.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#8 2025-03-08 19:26:01

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

Tried clearing the cache already. Some more info:

Build partition with pristine minimal system.
First thing I did before testing yesterday, dropped a .jpg of my cat (3.5 mb) into home.
It thumbnailed, viewed, and cached the thumbnail properly. I deleted the picture of the cat and rebooted, and thumbnail was still cached in ~/.cache/thumbnails/normal.

Added packages and got to where we are today, cleared the cache, rebooted, no cached thumbnails.

heic/heif and also avif files thumbnail and view, but no caching still.

I converted both an avif and an heic to .jpg using my image re-sizer, worked fine thumbnail showing and viewable.

But it did not cache those new .jpg's. Added another .jpg from a different partition and that didn't cache either, it seems like now it doesn't want to cache anything.

Scratching my head here, wonder if something in the new packages affected caching?

Offline

#9 2025-03-08 23:42:58

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

^ If I remember correctly (again), the PCManFM thumbnails cache is located in the ~/.thumbnails folder.

I have a rule that I always follow.
I never install an additional file manager because the existing one is probably best integrated into the OS.

The above cleanup commands should work for all file managers (including PCManFM, Caja, Nemo, Nautilus...).

Maybe @ceeslans has PCManFM installed somewhere and can try to help you.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#10 2025-03-09 17:13:30

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

I'm afraid after a mountain of testing yesterday, that this will not get solved completely, an issue exists in PcmanFM that I was not aware of, and won't get fixed in the gtk2 version, have not checked my test trixie iso which has the gtk3 version yet, but i'm guessing it's not fixed but maybe I can get a bug report in for it at least.

Everything works fine in Mate/Caja.

As far as the thumbnails go with regard to adding support for the newer filetypes here's what works in PcmanFM:
AVIF files: good to go for thumbnails, but no caching
HEIF/HEIC: good to go for thumbnails on small images, large ones over 500k or so, no thumbnailing. And no caching.
The only way to get it to thumbnail the larger ones is to set PcmanFM thumbnail size to either it's max, or zero, and in both cases this shuts off caching completely for all images.

Vanilla PcmanFM without adding heif packages, just it's natural as-shipped state:

The thumbnail size thing in preferences is badly dysfunctional. There should be two controls as there are two things at play, to wit:
1. thumbnailing
2. caching of thumbnails

But that control tries to control both, and does so in a weird, buggy, and very non-linear way.

Firstly, all images should get thumbnails, period. So that shouldn't be on the table. Unfortunately it is with this control.

At the larger settings, it allows all images to be thumbnailed but very few to be cached, so it's actually acting like that control should actually say "Do not cache thumbnails above this size: " because that's all it does at any setting over 4096 kb.

Below 4096 all the way down to the default 2048 and past that on down to around under 100 kb somewhere, it will cache any images bigger than that, but it's completely wonky about thumbnailing them, at any setting it arbitrarily refuses to thumbnail some images, without regard to size or format or anything else, just refuses to thumbnail random images. Chage the size a bit and you get back thumbnails for some, while losing them for others, it's completely random.

Down at the lower levels that behavior slowly stops finally ceasing around 64 kb, but now it stops thumbnailing specifically anything below that number and you can no longer get thumbnails of smaller files, just a generic icon.

At 32 kb and below you get a mountain of thumbnails, and some possible weird looping behavior if you open your thumbnails folder to look at what you have cached.

So either way, you can't optimize behavior, at 4096 and above you finally get thumbnails of all files, but very little caching, so files full of large pics have to re-thumbnail every time you go to that directory. But this is fairly tolerable at least.

At 64 kb and below, you get lots of caching, so secondary openings of those directories are lightning quick, but no thumbnailing of the smaller images which sucks, everything should thumbnail at least, the control should ONLY control caching.

On the bright side, did get the new filetypes somewhat dealt with, and can manipulate them size-wise with scripts I already have and view exif info with a click etc.

AVIF is FAR more cooperative in testing than HEIF FYI.

Offline

#11 2025-03-09 18:15:11

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

TL;DR version: PcmanFM needs to be altered, the control in preferences needs to ONLY control caching and needs to read that way, all images above the size entered need to be cached, all those below do not.

And all images should be thumbnailed period, so you can view them instead of an icon in the file-manager.

Sounds simple but i'm sure it's not, and I have no skill at packaging...so i'll try and file a bug report for the future gtk3 versions. Gonna take a look at source code later and just see if it's something above my pay grade.

*sigh* high-pressure line on my power-steering in the truck blew out, gonna be fixing that and likely cursing loudly for the next few hours, it's been a rough couple weeks. sad

Offline

#12 2025-03-10 01:42:47

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

Update: fixed the power-steering line, i'm now literally a bloody greasy mess, but I won. I don't believe in the no-win scenario.

I believe PcmanFM can be fixed.

I also believe Tint2 can be saved.

That's not just the beer talking mind you.

Offline

#13 2025-03-10 18:38:05

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

Filed a bug report, I was wrong about the gtk2 version, it's still being maintained and they are fixing things and have a new version out.

Offline

#14 2025-04-25 17:46:10

greenjeans
Member
Registered: 2025-01-18
Posts: 227
Website

Re: (SOLVED) How to make HEIF/HEIC thumbnails work in PcmanFM?

Marking this solved for now. Setting PcmanFM thumbnail control at 4.2 mb or above and everything gets thumbnailed and it will properly cache thumbnails over that size. Obviously that leaves a lot of files from 1-4 mb un-cached, but at least there aren't any errors.

For all the other files, I made a script that runs once at boot, and also added a menu entry to run it at any time, that scans the users home folder only (excluding hidden files) and checks for images and videos and whether they have a cached thumbnail, if not it generates the thumbnail and caches it properly. Setting is adjustable, I have it set to cache anything over 100 kb. It doesn't generate on-the-fly like the file-manager does, but in practice it works great and helps a LOT. Now when I first open an image-heavy folder in PcmanFM it's lightning-quick as are subsequent visits to such folders.

Its a band-aid, not optimum but works in the meantime, maybe somebody upstream will take notice and fix the underlying problem.

Offline

Board footer

Powered by FluxBB