Displaying remote images in Org-mode

Author
Affiliation

Jay Paul Morgan, PhD

Swansea University

Published

March 18, 2023

Modified

December 1, 2024

In one of my previous posts, I explained how a remote python process can be setup in an org-mode documents. Therefore, allowing you to offload any large compute to a remote server.

However, in the previous post, I mentioned how I was unable to get images created as a result of a remote process (i.e. plotting with matplotlib) to display inline. My workaround was just to visit the remote file in a separate buffer using C-c C-o. But today, I chanced upon this stackoverflow answer that exactly solves my issue.

Unbeknownst to me, there is an variable that specifies how org-mode should handle remote paths. This variable, aptly named org-display-remote-inline-images (perhaps I should have searched in emacs’s variable list for some combination of these keywords), can be change from skip (which ignores any remote paths), to download which will display the image inline!

This is the documentation for this variable.

org-display-remote-inline-images is a variable defined in ‘org.el’.

Its value is ‘skip’

How to display remote inline images.
Possible values of this option are:

skip        Don’t display remote images.
download    Always download and display remote images.
cache       Display remote images, and open them in separate buffers
            for caching.  Silently update the image buffer when a file
            change is detected.

By setting this variable appropriately, working with a remote process in org-mode is just as it is with a local process – seamless.

Citation

BibTeX citation:
@online{morgan2023,
  author = {Morgan, Jay Paul},
  title = {Displaying Remote Images in {Org-mode}},
  date = {2023-03-18},
  url = {https://morganwastaken.com/blog/2023-03-18-Org-babel-remote-images},
  langid = {en}
}
For attribution, please cite this work as:
Morgan, Jay Paul. 2023. “Displaying Remote Images in Org-Mode.” March 18, 2023. https://morganwastaken.com/blog/2023-03-18-Org-babel-remote-images.