Skip to content

Instantly share code, notes, and snippets.

@metaphore
Last active January 1, 2023 15:56
Show Gist options
  • Save metaphore/53bc673a888021b4eb1469f92d110d85 to your computer and use it in GitHub Desktop.
Save metaphore/53bc673a888021b4eb1469f92d110d85 to your computer and use it in GitHub Desktop.
Gnome | Better image thumbnails
[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;
@metaphore
Copy link
Author

metaphore commented Jan 1, 2023

"Better" general purpose image thumbnails. Uses no filtering (crisp pixel art preview).

Pre-requirements:

  1. Imagemagic must be installed and convert should be available from the PATH.

Installation:

  1. Place images.thumbnailer to ~/.local/share/thumbnailers/images.thumbnailer
  2. Delete all old thumbs: rm -r ~/.cache/thumbnails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment