For privacy and security reasons, you may prevent system file manager from displaying thumbnail preview images for your files.
And, this simple tutorial is going to show you how to do the trick for either all files or specific file formats in Ubuntu 22.04, Fedora 36/37, Linux Mint 21. Though it should work in other Linux with same desktop environments.
Disable Thumbnail Preview for All files
It’s super easy to disable the feature for all files, since most Linux’s file manager offers a menu option to disable the function.
For Ubuntu 22.04, Fedora 36/37 and other Linux with GNOME, simply open ‘Files’, go to ‘Preferences’ via ‘≡’ menu. In pop-up dialog, select “Never” from drop-down box for Show Thumbnails option.
Similarly, Linux Mint user can go to menu View -> un-tick ‘Show Thumbnails’ in Nemo file manager to do the job. And, the thumbnails will dis-appear immediately!
Disable Thumbnail image for Specific Files
To disable thumbnail images for certain file types, while keeping other file displayed. There’s a hidden options available. Though, you need to first find out the MIME type of your files.
Step 1: Get File MIME Type
First, right-click on blank area of the folder that contains you files, and then select “Open in Terminal“. When terminal opens, run command:
file --mime-type FILE_NAME_HERE
It will output the mime type of the specified file here.
TIP: you don't have to type full filename, just type the first few characters and hit 'Tab' to auto-complete it.
Step 2: Stop generating thumbnails for specific MIME types
Option 1: Use Dconf Editor
After found out the MIME types of your files, you can use the graphical “Dconf Editor” configuration tool to stop system from generating thumbnails for them.
- First, search for and install “Dconf Editor” from Ubuntu Software/Gnome Software, or other package manager depends on your system.
- Then, launch ‘Dconf Editor’ and navigate to ‘org/gnome/desktop/thumbnailers/disable‘
- Finally, turn off “Use Default value”, and type desired MIME types into custom value box. Add quotation marks for each MIME type, and separate them via comma.
- Click on ‘Apply’ button when prompted and done.
NOTE: for Linux Mint Cinnamon, navigate to “org/cinnamon/desktop/thumbnailers/disable” in Dconf Editor for the settings, or go to “org/mate/desktop/thumbnailers/disable” for MATE desktop.
Option 2: Run Single command
For those familiar with Linux commands, search for and open a terminal window. Then run one of the commands below to do the job:
- For Ubuntu, Fedora Workstation, other Linux with GNOME, use command:
gsettings set org.gnome.desktop.thumbnailers disable "['video/mp4', 'image/png']"
- For Linux Mint Cinnamon (replace
cinnamon
withmate
for MATE desktop), run:gsettings set org.cinnamon.desktop.thumbnailers disable "['video/mp4', 'image/png']"
Add or remove file MIME types in the command above accordingly and done.
Step 3: Clear old thumbnail caches
Previous step will stop generating thumbnails, but old caches still exist on your system until you remove them.
To do so, simply open terminal and run command:
rm -r ~/.cache/thumbnails/
You can of course remove the cache folder from file manager window, though you need to press Ctrl+H on keyboard to show the hidden “.cache” folder first.
That’s all. Enjoy!