Generate and preview freedesktop-compatible thumbnails for images on Yazi with the power of AllMyToes.
# Linux only
git clone https://github.com/Sonico98/allmytoes.yazi.git ~/.config/yazi/plugins/allmytoes.yazi
For the time being, it's recommended to follow these steps instead.
If you build yazi from source, starting from commit c2affae you can add the following to your yazi.toml
configuration file:
Only compatible with commit c2affae or higher (or yazi 0.2.6, to be released)
Add this to your `yazi.toml`:[plugin]
prepend_previewers = [
# Allmytoes doesn't handle these by default
{ mime = "image/svg+xml", run = "magick" },
{ mime = "image/heic", run = "magick" },
{ mime = "image/jxl", run = "magick" },
# Handle other image types with allmytoes
{ mime = "image/*", run = "allmytoes" },
]
prepend_preloaders = [
# Allmytoes doesn't handle these by default
{ mime = "image/svg+xml", run = "magick" },
{ mime = "image/heic", run = "magick" },
{ mime = "image/jxl", run = "magick" },
# Handle other image types with allmytoes
{ mime = "image/*", run = "allmytoes" },
]
Make sure you have AllMyToes installed and in your PATH.
Because the thumbnails follow the freedesktop spec, they can be generated from any other application that follows the spec, like graphical file managers. This means you'll be able to re-use preexisting thumbnails between yazi and other programs.
Once generated, yazi will display the largest thumbnail directly the next time you use it. It works just like how the default previewer caches images, but in a multi-application compatible way, and persistent across reboots by default. In my limited, not benchmarked tests, I could notice faster image previews in directories containing multiple large images using allmytoes than with the default previewer.