Nemo File manager wont thumbnail preview AVIF files

With ZorinOS 17 everything seems to work just fine, I assume this must've been an update in between Ubuntu 20.04 and Ubuntu 22.04.

I just checked Nemo and it is indeed showing avif thumbs but it seems to do so by using an apt called Darktable ....

Doing some research right now to find out if when you finish editing your photo you can save it in another format other than avif ...... so far it only makes changes to the avif file itself ..... but not done researching it yet ....

1 Like

It seems to work fine for me:

@Aravisian , thanks!

@zenzen , @Frog , well, its worth mentioning that I am using Zorin OS 16.3, not 17. are there any disadvantages of upgrading? will anything break or change?

And thanks for you guys checking your own OS's to see if AVIF loads.

1 Like

I checked my preferences but mind that I have Nautilus :sweat_smile:, see if you set that thumbnails are set to appear for EVERY file and over a reasonable file size.

It's a major release; expect some changes. Packages will be more up to date, and the newer kernel typically brings various improvements in the form of new features, performance optimizations and hardware compatibility.
More up to date packages is not always a good thing, it just depends, but in any case you will have to try for yourself to know it works for you or not.

The most significant changes are listed in this pinned announcement:

3 Likes

I am also still on 16.3 as I await the Lite Edition. I have done testing on 17 Core, but not used it extensively with daily driving. :stuck_out_tongue:

1 Like

@Aravisian , Alien didnt work,

sudo alien /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm avif-pixbuf-loader-0.10.1-10.x86_64.deb
[sudo] password for user:  
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
warning: /home/user/Downloads/avif-pixbuf-loader-0.10.1-10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2dcd03a2: NOKEY
avif-pixbuf-loader_0.10.1-11_amd64.deb generated
File "avif-pixbuf-loader-0.10.1-10.x86_64.deb" not found.

Don't fret Jessie .... I have been searching for more than a year to find anything that will convert avif files ..... I have only found one and that is Gimp but it does have it's draw backs ..... by the way I'm using Zorin 17 Pro .....

Only with an extension will it work and it will only do one file at a time as it uses the export feature after you have changed the avif file to a different format ....

But that has it's draw backs as the extension is using flatpak to install and along with the extension flatpak will upload dozens of other apts and files ..... (I did a post on this recently) .....

For me Gimp was not the answer as I download between 5-50 photos at a time and all are in sequence ..... and although Gimp does have a batch program I haven't been able to batch convert avif ..... TG I don't have avif files to deal with all the time ....

I have personally tried most of the apts that claim to convert avif but they lie as I haven't found one that worked .... at least when I was testing them out that was true ....

The solution for me was to copy the files I want to convert and go back to Win 10 convert them and copy them to the thumb drive and put them in my Z17 Pro photo program ..... why Win 10 ..... because it is a M$ file extension ..... good ol' M$ does it again ....

Even though I have the thumbnail show in my Nemo Pictures Folder and can't find a way to enlarge it or transfer it to my photo apt (which is XnView MP) .... another apt that claims to convert avif .... so I can view and batch my photos .... it transfers or copies and pastes as avif .....

Enter Darktable a darkroom type photo enhancer .... it will display a avif file for you to manipulate but I can't figure out how to change file format or batch file using Darktable .....

Maybe you will have better luck than I have had .... if so please let us know ....

2 Likes

@Frog , well i had no idea you were having problems converting AVIF. My problem is different of course, i just cant view the thumbnail for AVIF in either nautilus or nemo. But I actually have a great solution for you, to help convert AVIF. I've made posts in this forum about this. I'm big on lossless media, I prefer high fidelity data quality, so I prefer to use .png and .tif/.tiff, and I do a lot of batch image converting in general, and right click easy convenient converting of single files. In windows its much easier to batch convert one file type to another & find tools. But in linux, unless ur an expert in bash or python, its very difficult. But I am good at problem solving so I found a way to batch convert images. I found this tool, and the mods of that github project are still helpful with the project also. And everytime a image file type arises that their tool cant convert i notify them and they have always helped

I got them to improve it to where they can convert jxl, avif, heic.

This tool only works in Nautilus, so I use both Nautilus and Nemo.
I prefer Nemo because you can double click a file and rename it, which is quickest and very convenient and is what Windows OS does too.

1 Like

It's possible to implement something like this in Nemo as well, through custom actions:

The only downside is that Nemo doesn't yet support submenus for custom actions, and after a few of these the context menu would look too busy (although custom actions can be associated to certain file extensions so they only show when applicable). In addition, as you said, this is more useful when you know how to program a little bit (no need to be an expert) as there are a few gotchas to watch out for.
If you are interested, I can help you make a couple of these for your most common actions and see if you like it.

All it takes is a file named $HOME/.local/share/nemo/actions/<action_name>.nemo_action containing something like this that describes what will happen:

[Nemo Action]
Active=true
Name=Convert to AVIF
Comment=Exactly what it sounds like
Exec=/home/zenzen/Desktop/convert.py -f .avif -o "%p" "%F"
Selection=all
Extensions=jpg;jpeg;png;

In this case I just so happened to have a Python script that converts images much like the Nautilus file converter extension that you shared, but you can run any other command or tool (again, with some gotchas depending on the task).

Went to the website you posted and all the files and apts mentioned were already installed ..... that is until I got to this one ....

pip install pyheif

As it said you might have a problem installing it I installed it first ....

yum install libffi libheif-devel libde265-devel

So I installed yum first and then the other one after but something went wrong ..... see below .....

mike@mike-ROG-Strix-G731GT-G731GT:~$ yum install libffi libheif-devel libde265-devel
Command 'yum' not found, did you mean:
command 'uum' from deb freewnn-jserver (1.1.1~a021+cvs20130302-7build1)
command 'sum' from deb coreutils (8.32-4.1ubuntu1)
command 'yum4' from deb nextgen-yum4 (4.5.2-6)
command 'zum' from deb perforate (1.2-5.1)
command 'num' from deb quickcal (2.4-1)
Try: sudo apt install
mike@mike-ROG-Strix-G731GT-G731GT:~$ yum4 install libffi libheif-devel libde265-devel
Command 'yum4' not found, but can be installed with:
sudo apt install nextgen-yum4
mike@mike-ROG-Strix-G731GT-G731GT:~$ sudo apt install yum
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package yum
mike@mike-ROG-Strix-G731GT-G731GT:~$ pip install pyheif
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyheif in ./.local/lib/python3.10/site-packages (0.7.1)
Requirement already satisfied: cffi>=1.0.0 in ./.local/lib/python3.10/site-packages (from pyheif) (1.16.0)
Requirement already satisfied: pycparser in ./.local/lib/python3.10/site-packages (from cffi>=1.0.0->pyheif) (2.21)
mike@mike-ROG-Strix-G731GT-G731GT:~$

Where did I go wrong .....

I noticed that in the photo you posted it shows "convert to avif" I want to convert from avif .... any suggestions ????? .....

@zenzen ,

The only downside is that Nemo doesn't yet support submenus

Thanks for the info, i didnt know that or I forgot. There is a workaround to that actually, which is to create the tool and make it a program that comes up under the "Open with >" submenu. However, I have no current need for that, its not necessary for me. I dont have a cluttered context menu yet, yet anyways. haha

Here is a script i found that converts png in batch, and it works well, but it doesnt distinguish what has been selected via one's cursor, it converts all images in a folder, which is not exactly what we want. And it is not as efficient. It requires more time consumption, one has to move all images one wants to convert into a folder.

This script converts all image files to PNG, using nemo, Make sure to open terminal in that folder.

for file in *.{jpg,jpeg,png,JPG,gif,bmp,tiff}; do
    if [ -f "$file" ]; then
        filename=$(basename -- "$file")
        extension="${filename##*.}"
        filename="${filename%.*}"
        convert "$file" "$filename.png"
    fi
done

Here is a problem I've been having, I have gotten A.I. to help me write scripts that distinguish what is selected, and also, i told it to at the end verify all images have in fact been converted and take note if there are any errors, and also create a popup box that notified me of the results.
Here is where I left off & had to abandon it, almost finished and working, but I just dont know how to fix A.I.'s bugs. This is a .sh script and a python script, I tried both methods with A.I.

Its important to note, that when we are converting possibly hundreds of images in batch, that we design the script or program to verify that all images converted successfully and that there were no errors, and for it to give us a successfully completed popup, or error popup box that we have to press okay to close.

2.) And thanks for telling me how to create a right click menu tool for nemo, that's cool, i appreciate that.

@Frog , unfortunately I'm not very knowledgeable about writing computer code, or installing linux packages. But you should actually ask that issue with their github project page, under the "issues" section, that is the same place they have helped me when I submitted my own issues or requests for improvements/enhancements. I should mention also it was not an easy tool to setup, I came across many issues myself that I needed their generous help with. But now that they and I have paved the way/path for installing it & ironed out many problems, it should be much easier for you to get it all installed.

The yum command is for the RedHat Linux and derivatives package management. On Zorin OS, we use the Debian package management, so, you would use apt not yum"

sudo apt install...

1 Like

This actually uses Imagemagick, Nemo doesn't have the ability by itself to run any image processing. It's an excellent tool but you can try this one for better performance, particularly with larger images:

I took at look at those scripts generated by AI... and I'm glad to see that developer jobs are not going away anytime soon :robot: :hammer: . Although to be fair, it was given the impossible task of guessing which files were selected in the file manager; the whole point of using Nemo Actions is precisely to provide the script with the information it needs to run.
On a related note, please don't share plain text files through services like that... downloading files can be dangerous, and you can't know if that service is embedding anything to them. Instead I recommend something like Pastebin or similar; organizations like Debian, OpenSUSE and others also have offer this publicly.

Anyway, here's my version of the script. Nowhere near perfection either, but will be able to do the job just fine in combination with Nemo Actions or through the command line:

https://paste.debian.net/1309881/

It does require the following packages installed to run properly. In the terminal run:

pip3 install Pillow pillow-avif-plugin

To keep things simple, I would recommend Imagemagick. On ZorinOS 17 it should be a simple matter of installing it and it's ready to work. Note, however, that transparency may still be an issue without additional setup, but for full pictures it will work fine:

# Install with
sudo apt install imagemagick

# Run with:
convert <input_image> -format <desired_image_format> <output_image>

# For example:
convert dog.avif -format png dog.png

Are you also looking to add this action to the context menu?

@zenzen , Thanks! :slight_smile:

I prefer to use file upload sites, do you have some file upload sites that you'd recommend me to use? & ones that dont require any registry?

https://files.fm works very well, which is the one i used earlier.

2.) So just to make sure I'm doing this right, your convert.py script above,
I also need to create a nemo action. You wrote it for avif, but it seems all i need to change is the -f .avif and change it to -f .png ? and change the name also of course. See below:

[Nemo Action]

Active=true

Name=Convert to AVIF

Comment=Exactly what it sounds like

Exec=/home/zenzen/Desktop/convert.py -f .avif -o "%p" "%F"

Selection=all

Extensions=jpg;jpeg;png;

For file sharing I prefer something like Send which is a fork of the now discontinued Firefox Send. It's fully open source and can be self-hosted, and it also supports use through the command line. But for plain text files I'd much rather use something simpler like the links I already shared; just preference.

Yes, the script itself will work with any format (well, the most popular ones anyway) and can run on the command line normally, but to use it in the context menu you'll have to create a separate nemo action file for each use case.

The -f or --formats flag is used to specify the desired output format or formats you want to convert to. For example use -f .png .webp .avif to convert to all those three in one go.

Use -o or --output-dir to specify the location where you want to save the converted images. By default it will use the same directory as the original images.

Inside the nemo_action file make sure to change "Exec" to point to the location to the script in your computer. And the "Extensions" field to specify which under which files will the option appear. At the moment however the script will convert from .jpg, .jpeg, .png, .webp and .avif.

Thanks :slight_smile: I know about https://send.vis.ee actually, just never got around to using it. I was content with the other one's i've been using, but I have no issue with using it. And thanks for the advice about it.

2.) I've got it all set up and almost working however its not producing, outputting anything.

What should this look like if I want it to output into the same folder that the images I want converted are in? I need to know what to put for "%p" & "%F"?

Exec=/home/USER/Desktop/convert.py -f .avif -o "%p" "%F"

--Thanks!

1 Like