hatmatrix
hatmatrix

Reputation: 44912

Exporting figures with svg images

I have a embedded image in an .org file which I then publish as html. The line included in the .org file is

[[./img/fig.svg]]

This is translated into html as

<p><img src="./img/fig.svg"  alt="./img/fig.svg" />
</p>

This image shows up in Chrome and Opera when I load the page, but in Firefox I only see the link as text ("./img/fig.svg"). I wonder what I need to do to export the svg so that it will load in Firefox - either in org-mode or after export in html. Thanks

Upvotes: 0

Views: 363

Answers (1)

Jonathan Leech-Pepin
Jonathan Leech-Pepin

Reputation: 7884

I cannot reproduce this issue (with regards to Org and org-export-as-html). I used the following to test:

ORG
#+property: cache yes

* SVG test

This is a test to see if SVG images load properly in firefox

[[./img/Bitmap.svg]]

Small codeblock simply for extra content
#+name: testing
#+begin_src emacs-lisp
  (message "this is a test")
#+end_src

#+RESULTS[cb71d15e075dd84e5bc916f61562820a5695d056]: testing
: this is a test
HTML
<h1 class="title">SVG test</h1>

<p>This is a test to see if SVG images load properly in firefox
</p>
<p>
<img src="./img/Bitmap.svg"  alt="./img/Bitmap.svg" />
</p>
<p>
Small codeblock simply for extra content
</p>


<pre class="src src-emacs-lisp">(message "this is a test")
</pre>

This displays without issue in Opera 11.61, Firefox 10.0.2 but fails in IE8 with a message that the protocol is unavailable. Do other SVGs work in Firefox when you try to view them?

Upvotes: 2

Related Questions