I can see many image formats in orgmode, but not SVG.

I get the error Invalid image type 'svg' when I run org-display-inline-images.

It should be possible given this question exists: https://www.reddit.com/r/emacs/comments/2o21gf/orgmode_svg_rendering/

I didn't see an obvious package to install, or other way to fix this.

EDIT: This is on Mac OS X 10.9.5, Emacs 24.4.1 (installed via homebrew), Org 8.3.2. (image-type-available-p 'svg) returns nil.

  • 7
    Emacs handles this differently depending upon the OS, and depending upon the libraries available at the time of building Emacs and the libraries available subsequent to building Emacs. What OS and what version of Emacs are you using, and where did you download the Emacs version if you did not build it from scratch? Evaluate in a *Scratch* buffer (image-type-available-p 'svg) or just type M-x eval-expression RET (image-type-available-p 'svg) RET and see whether the answer is t? If the answer is nil, then you don't have svg support presently available -- i.e., time for plan B. – lawlist Oct 21 '15 at 1:59
  • This is on Mac OS X 10.9.5, Emacs 24.4.1 (I believe via homebrew), Org 8.3.2. Sadly, that function call returns nil. – avv Oct 21 '15 at 7:32
  • 2
    If by homebrew, I think you must have compiled it yourself? The solution might be as simple as installing libsvg (presumably also available in homebrew) and then recompiling emacs. The configure script should take care of the rest. – Harald Hanche-Olsen Oct 21 '15 at 12:48
  • 2
    Great! I used which emacs and brew info emacs to confirm that I installed via homebrew, and it was missing librsvg, so I used brew to install librsvg. That said, I'm a little worried about re-compiling emacs right now, given deadlines and the potential for that to take longer than expected when something else breaks. But I'll try that soon, especially if I can figure out a way to make sure I can easily return to the old setup if need be (is it just a matter of backing up the emacs binary? or might homebrew change/update a number of binaries and other files?). – avv Oct 21 '15 at 17:52
  • Since I don't use homebrew myself, I can't comment on how hard it is to back out of a failed upgrade. But if you have built the nextstep version, getting Emacs.app, everything should be contained in that, so you just take a copy and put it somewhere safe. If you built the X11 version, there will be lots of files created as part of the installation. – Harald Hanche-Olsen Oct 21 '15 at 18:03

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.