I am running Emacs in a Terminal application, or more specifically iTerm2, which is able to display images within the terminal, like this

enter image description here

I'm wondering if it is possible to have images displayed on the terminal by an Emacs process? (either inline or within a separate window is OK)

I tried M-x iimage-mode on a buffer containing [[tmp.png]], but got an error saying Invalid image type ‘png’. After some investigation, I realized that the value of image-library-alist is nil, which means no image types are supported, but I think this is theoretically feasible. Again, I want to achieve this without using a windowing system like X.

  • Displaying images isn't exactly... standard operation for terminals. I'm quite sure that stock-built Emacs isn't capable of interacting with a particular terminal to get it to display images. The only way I can think this could be approached is if you add some specific code Emacs C source code, where it calls to the special iTerm2 functions which display the image. Which would seem like it would be a lot of work... – wvxvw Feb 18 '19 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.