When did Org start using the <object> tag for inline image HTML export? This is a horrible bug.

I use many SVG images in my documents. Here is a sample bit of Org code:

#+ATTR_HTML: :width 50% :style display: block; margin-right: auto; margin-left: auto;
[[./graphic-1.svg]]

I used to get this when exporting:

<img src="./graphic-1.svg" alt="graphic-1.svg" width="50%" style="display: block; margin-right: auto; margin-left: auto;" />

Now I get this:

<object type="image/svg+xml" data="./graphic-1.svg" width="50%" style="display: block; margin-right: auto; margin-left: auto;">Sorry, your browser does not support SVG.</object>

The problems with the second bit of exported code is that it doesn't scale the image to fit the block with 50% width (only a small part of the image is visible), and you when you right click on the image, you can't view it, save it or anything.

The documentation for 8.3.1 says this about org-html-inline-images:

   Non-nil means inline images into exported HTML pages.  This is done
   using an <img> tag.  When nil, an anchor with href is used to link
   to the image.

Clearly, Org 8.3 is not using an <img> tag when exporting SVG images to HTML, something which is a major issue for me. It essentially makes Org unusable for HTML export. I really would appreciate a fix for this bug.

Scott Randby

Reply via email to