I have a org-mode document, with some inline images:


These render properly on GitHub wikis, but fail when I use org-latex-export-to-pdf. However, I can get the pdf export to work by changing the path slightly:


Notice the ./ at the beginning. But writing them in this way breaks the link for GitHub wikis. As a workaround, I manually changed the image references, but I am hoping there's a better way.

Is there a way to include images which properly renders both in GitHub wikis and org-latex-export-to-pdf output?

  • Considering both the markdown and the PDF (via LaTeX) export backends are both in the standard org-mode distribution, this could be considered a bug. Consider reporting it. – DoMiNeLa10 Apr 16 '18 at 14:30
  • @DoMiNeLa10 Maybe I should clarify that the doc is saved as .org on GitHub's wiki, so it's possible the GitHub org-mode implementation is at fault. It seems like GitHub treats relative links weirdly in their wikis even in Markdown, so I'm more suspicious of it than of org-mode. – hoosierEE Apr 16 '18 at 22:34
  • This changes things quite a bit. I've noticed picture links are broken in org readmes as well, so I wouldn't be surprised if it's the case for wikis. Considering things work the same way for markdown, github would have to add an exception for org-mode, and I think it's a reasonable thing to request. – DoMiNeLa10 Apr 17 '18 at 12:55

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.