Limit maximum thumbnail size in Dolphin

As far as I am aware (and I have been searching!) there is currently nothing in the way of configuring thumbnail creation, other than the “Preview Settings” page in “Configure Dolphin”. In fact, I started a similar thread a few days ago, which at its core is also about wanting more control over how thumbnails get created, but it has not gotten any replies yet.

If your main problem is about wasted space, you could do some of the workarounds I did:

  • mounting ~/.cache/thumbnails to a ram disk, which is one line in /etc/fstab:
    tmpfs /home/username/.cache/thumbnails tmpfs defaults,noatime,uid=username,gid=username,mode=1700 0 0
    This way they will automatically be gone after you shutdown and not be saved to disk at all
  • automatically deleting thumbnails some time after they get created, which is one line to add in $ crontab -e:
    0 * * * * find /home/username/.cache/thumbnails/ -mmin +240 -delete

Of course, neither of those “hacks” will prevent the thumbnail service to use cpu power on creating the thumbnails, or rather, this probably will use more cpu because thumbnails will have to be recreated after being removed, but it’s the best I could come up with so far.

One heads-up, though, dolphin is not the only application creating files in these folders, it’s a whole specification that, in theory, should make it so thumbnails can be shared between multiple applications (Thumbnail Managing Standard). This also means other applications might be responsible for creating these files, though.

1 Like