Is there a way to make Files show previews for .kra files?

I use Krita, and I like to save my drawings as the native .kra file, but I notice that it does not show a preview / thumbnail in Files (screenshot below), unlike jpegs and pngs. Is there a way to make it so kra files also have a preview?

Maybe this can help you. I tested the first method of link 1 with a custom file created in krita and saved as .kra , and the thumbnail was shown after I ran

nautilus -q
nautilus

I'm not sure if there is still an AppArmor bug

1 Like

Thank you for the answer! but truthfully, I am not that acquainted with the terminal. I interpret the instructions as changing directory to .local, and the making the highlighted directory, but this is probably wrong as I obtain this in return:

~/.local$ mkdir ~/.local/share/thumbnailers/krita.thumbnailer
mkdir: cannot create directory ‘/home/hp/.local/share/thumbnailers/krita.thumbnailer’: No such file or directory

Would it be alright if you also explained what the linked instructions say to do? Apologies for the inconvenience.

Press ctl+h in your file manager to show the hidden files.
Then create a folder (right-click> create folder/directory) in ~/.local/share named thumbnailers or run

mkdir ~/.local/share/thumbnailers

Then open this folder and create a new empty file/document there, name it krita.thumbnailer and put the copied content from the link into that file and save it.

1 Like

It worked. Thank you for the help!

1 Like

Unfortunately, I can't explain exactly what the command in the file does. If I understand correctly, .kra files are compressed files, and this file causes the .kra files to be extracted and a preview image of them to be displayed in the current directory.

This link about creating custom thumbnailers shows a little bit the procedure, but I find it complicated to understand.

%i and %o are the input file and the output file, unzip is the command to unzip the archive .kra.

A faster method to create this file when you get an error as above
"mkdir: cannot create directory ‘/home/hp/.local/share/thumbnailers/krita.thumbnailer’: No such file or directory" (because the folder thumbnailers didn't exist yet), is to run the command with a -p

mkdir -p ~/.local/share/thumbnailers/krita.thumbnailer

This command creates the folder (if it not yet exists) and the file, you just need to enter the content into the file.
You don't need to start at ~/.local, you can put this command in a fresh terminal window, starting in your user's home directory.

Or you create all folders and files with your file manager. Most times I use the file manager because I'm more used to it.

1 Like