4

I'm currently preparing a presentation which I've outlined in org-mode and I'm having difficulty in including diagrams in the exported HTML. I'm currently using org-reveal but I'm happy to use another HTML presentation exporter if needed. org-reveal does offer the option to include HTML directly in the presentation but that seems a little hacky. Surely there is a better way to specify that an image should be in-line in the final exported output?

  • Hmmm it seems the solution is to drop the link name :-/ – stsquad Oct 3 '14 at 15:37
  • 2
    Image export using org-reveal works for me. I simply use [[file:./path/to/img/img.png]] – Kaushal Modi Oct 3 '14 at 18:41
  • Does this help? The Org Manual – Luke Oct 3 '14 at 22:53
  • @stsquad yeah, that's not terribly intuitive, but if a link has a description org won't turn it into an image. If it solved your problem write it as an answer! – Malabarba Oct 4 '14 at 8:47
2

Images can be exported as Inline in two styles: with hyperlink or without hyperlink.

Inline With Hyperlink

[[file:./image.png][file:./image_thumbnail.png]] 

Note that it is mandatory to put a prefix like file: or http: in the Description portion ([file:./image_thumbnail.png]) of the above image link; otherwise ox-html will export that as a text hyperlink pointing to the image.png.

You can use simply reuse image.png instead of image_thumbnail.png.

Below examples will result in inline image hyperlinks pointing to ./image.png:

[[file:./image.png][file:./image.png]]
[[./image.png][file:./image.png]]
[[file:./image.png][file:./other-image.png]]

Inline Without Hyperlink

[[file:./image.png]] 

Below examples will result in inline images without hyperlinks:

[[file:./image.png]]
[[./image.png]]

Text hyperlink to image

[[file:./image.png][Any text that doesn't begin with file:]]

Below examples will result in text hyperlinks pointing to ./image.png:

[[file:./image.png][Description]]
[[file:./image.png][./image.png]]
[[./image.png][./image.png]]
1

The details are in the org-mode manual but I missed it. Basically you need to ensure you don't add a title. So:

#+ATTR_HTML: :alt Architectural overview :style border:none;
[[file:diagrams/RISU_Architecture_Overview.svg]]

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.