Org-mode export as html: inline images are displayed and linked?

If I use the following syntax,

#+ATTR_HTML: width="200"


I should expect the page to display highres.jpg at the specified size, but clicking on it will need the file itself? This is what I get from these instructions . However, when I generate the html from the org-mode file, the image is displayed but not linked / clickable. Am I doing something wrong or misunderstood?


source to share

2 answers

In your example, this is treated as no description, because the description is identical to the link itself. The instructions you link to say to use the generated thumbnail for the description (which will be displayed instead of the full image).

On the other hand, I was unable to get it to respect #+ATTR_HTML: width="200"

when I changed the description text to resolve the difference

#+ATTR_HTML: width="200"


Instead, the embedded interactive image was full size. I don't know if this was intended or not, the best place to ask what is most likely to be the mailing list (where they can also fix this if it's a bug).

Added problem testing

Using the following piece of code

* SVG test

#+ATTR_HTML: width="200" title="Hello"

#+Caption: Test2
#+ATTR_HTML: width="200" title="Hello as well"


I am getting the following HTML, which explains why the strange result occurs with regards to image sizes:

<a href="./img/Bitmap.svg" width="200" title="Hello"><img src="./img/Bitmap.svg" alt="Bitmap.svg"/></a>

<div class="figure">
<p><img src="./Bitmap.svg" width="200" title="Hello as well" alt="./Bitmap.svg" /></p>


The original image is resized instead of the link image. Definitely a question about how the exporter interprets the information #+ATTRL_HTML

. Under the current exporter, the best option might be to create a thumbnail image for insertion.



In later versions of org-mode, the format seems to have changed. In Emacs 24.4.1 the following works for me:

#+ATTR_HTML: :width 200




All Articles