Getting thumbnailer working in nautilius

I’m running into an issue where my thumbnailers aren’t working. I’m basically trying to disable filtering on low res image files, so I can view pixel art. I’ve used this solution in the past on ubuntu and its worked well, but it breaks thumbnails on my nixos.

Here is the solution in the reddit post:

[Thumbnailer Entry]
TryExec=/usr/bin/convert
Exec=/usr/bin/convert -colorspace sRGB %i'[0]' -background transparent -flatten -filter Point -thumbnail %sx%s^ -gravity center -extent %sx%s png32:%o 
MimeType=image/png;image/bmp;image/x-bmp;image/x-MS-bmp;image/gif;image/x-icon;image/x-ico;image/x-win-bitmap;image/vnd.microsoft.icon;application/ico;image/ico;image/icon;text/ico;application/x-navi-animation;image/jpeg;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/tiff;image/x-xpixmap;image/x-xbitmap;image/x-tga;image/x-icns;image/jp2;image/jpeg2000;image/jpx;image/x-quicktime;image/qtif;image/vnd.adobe.photoshop;image/x-photoshop;image/x-psd;application/psd;application/x-psd;image/webp;

I have imagemagick installed, and I can run convert in the terminal. Running which convert gives me /run/current-system/sw/bin/convert which ive also tried replacing in TryExec and Exec but it still doesn’t work, same with just using convert.

I know for sure its reading my thumbnailer file though, as when I remove this file, it shows all the thumbnails again, but only as default.

Also I know about nautilus -q and deleting the thumbnail cache so thats not it either. :confused:
Any help would be appreciated.

Maybe try deleting the ' quotes around the '[0]' and see if that works. You can also try replacing them with double quotes " if that doesn’t work.

omg i found the issue, i was using the wrong imagemagick package(where convert is from) in my nix config. i should’ve checked that sooner.

Interesting. What package is that?

I’m trying this with Nautilus and it doesn’t work, but with Nemo it does :thinking:

i was using imagemagick_light instead of just imagemagick because all im using it for is thumbnails so i thought light would be better lol

And then for the path im using /run/current-system/sw/bin/convert instead of /usr/bin/convert

For nautilus i would delete the .cache/thumbnails/ folder, then run nautilus -q to make sure its closed. and then new thumbnails were generated.

1 Like

Thanks, that did it.

Just a small note, running convert earlier I got a message telling me that magick should be used instead:

WARNING: The convert command is deprecated in IMv7, use “magick” instead of “convert” or “magick convert”

1 Like