Disable thumbnail creation for specific folders only, but all users

In addition to @Fabby answer:

  1. Install the package inoticoming

    sudo apt-get install inoticoming
    
  2. Create wrapper script disable_thumbnails

    #!/bin/bash
    
    # Create the thumbnail filename
    tn_filename=$(echo -n "file://$1/$2" | sed 's/\s/%20/g' | md5sum | awk '{print $1}')
    
    # Destroy the thumbnail without deleting
    find ~/.cache/thumbnails -type f -name "$tn_filename*" -print0 | while IFS= read -d '' file; do
      echo > "$file"
    done
    exit 0
    
  3. Make it executable

    chmod +x disable_thumbnails
    
  4. Kill running processes, if necessary

    killall inoticoming
    
  5. Watch your folder

    Avoid a trailing / for the folder names

    inoticoming "<path_to_disabled_thumbnail_folder>" <full_path_of_disable_thumbnails_script>  {} "<path_to_disabled_thumbnail_folder>" \;
    

There is only one problem. The changes are only visible after nautilus -q

Use inoticoming --foreground … to avoid the daemon mode, if you test the script.


To get the file name for the thumbnail, start md5sum for the original file name:

% echo -n "file:///home/user/Pictures/image%201.png" | md5sum
6e1669aea9c118cb2b7ad23fc6646c71  -

% find ~/.cache/thumbnails -type f -name "6e1669aea9c118cb2b7ad23fc6646c71*"
/home/user/.cache/thumbnails/large/6e1669aea9c118cb2b7ad23fc6646c71.png

Now remove the read permissions:

chmod -r /home/user/.cache/thumbnails/large/6e1669aea9c118cb2b7ad23fc6646c71.png

Restart nautilus:

nautilus -q

and you will have no thumbnail for /home/user/Pictures/image 1.png.

Now you only have to write a script that scans your particular folders and do the above steps automatically.

Credits :P