org-roam-ui
org-roam-ui copied to clipboard
Display images from org-download
I have several separated local roam directories. And with each I set up a separated image folder for it as following:
(add-hook 'dired-mode-hook 'org-download-enable)
(add-hook 'org-mode-hook
(lambda ()
(setq-local org-download-image-dir (concat "./.media/" (file-name-sans-extension (file-name-nondirectory (buffer-name)))))))
The preview in UI graph can not display images from org-download
.
I'm having a similar issue on Windows, trying to display an image linked in the following way:
[[C:/project/counts.png]]
Instead, the rendered URL in the org-roam-ui sidebar's preview includes my org-roam-directory like so:
c:/roam/C:/project/counts.png
which of course returns 404
Try using relative paths like:
[[counts.png]]
or [[media/image.jpg]]
Org download is using relative paths for me, but they're adding download:
in front of them which is messing the ui up. Removing that seems to break the inline display on emacs.
@Dev380 I don't think org-mode supports inline display of anything except image filepaths.
NOTE: I'm on emacs master, so some or all of my advice may not apply.
See the help for org-display-inline-images
:
2. Its description consists in a single link of the previous
type. In this case, that link must be a well-formed plain
or angle link, i.e., it must have an explicit "file" or
"attachment" type.
But I just tested the attachment
type and couldn't even get it to work. Actually...
If I add a description it breaks it.
Anyway, I think it's not supported or there is a bug but give leaving the description empty a try and see if that works.
I found that you can fix the problem with descriptions by calling (org-display-inline-images t)
which makes INCLUDE-LINKED
true.
I'm not sure why it doesn't resolve the link by default and goes by description text...