w3m
w3m copied to clipboard
Feature request: image support on Wayland
Since many distros will move to Wayland by default soon and some of us already use Wayland, it would be useful if w3m had image support also for terminals running on Wayland. It is possible to run a non-Wayland-native terminal in XWayland to get image support in w3m on Wayland, but it is inelegant to have to switch terminal (and often also source Xresource files) to use w3m with images. A fix for this would also be a way to get image support to terminals like Kitty and Alacritty which struggle with w3m and images even when run on X today.
I wish I were a coder that could make a fix and submit it, but I am not. Maybe a good approach would be to reuse code from a project like sway-img (https://github.com/artemsen/swayimg) to display images in a Wayland-native way?
A fix for this would also be a way to get image support to terminals like Kitty and Alacritty which struggle with w3m and images even when run on X today.
For these terminals there is an "Inline image display method" setting. Alacritty has a (still not merged) pull request for supporting the sixel protocol, you could try the img2sixel option with that if you're interested.
There's an option for using the kitty image protocol too. Although proper decoding of animated gifs is still missing (only the first frame is displayed), for everything else it works fine so long as ImageMagick is installed.
Thank you! :-) That's very interesting information. I will look into those options.