6

If I insert a jpg in my org-mode document, I can preview it and scale its width, like so:

Add the following code to my init.el file:

(setq org-image-actual-width nil)

Then insert this code in my document, where I want the image to appear:

#+ATTR_ORG: :width 300
[[./my_image.jpg]]

On executing org-toggle-inline-images the image appears in the buffer, 300px wide, as expected.

But if I attempt this same operation with an SVG file, I get a blank placeholder. If I then remove the #+ATTR_ORG tag, the SVG appears. (at it's pre-defined width)...

Can anyone tell me how I can resize my SVGs image previews? I am running the macports version of Emacs version 25.1 on El Capitan.

Thanks!

Adam
  • 1,857
  • 11
  • 32
  • Welcome to the Emacs StackExchange! Does this issue still occur when you start Emacs with a minimal init file? (That is, start with `emacs -Q` and load *only* the libraries related to your question.) If not, please try to [bisect your init file](//meta.emacs.stackexchange.com/a/204/675). – Scott Weldon Jul 19 '16 at 23:02
  • 1
    Thanks Scott! My init.el is quite length. So I started a fresh init.el file and added `(setq org-image-actual-width nil)`. This enables the width attribute on JPGs but has no effect on SVGs... – Adam Jul 20 '16 at 10:30
  • Thanks for confirming. (Feel free to [edit] that info into your post so that it can be found more easily.) Unfortunately I'm not familiar enough with embedded images in org-mode to be any more help at this point. – Scott Weldon Jul 20 '16 at 15:45
  • Can you check if svg is included in imagemagick-types? I. E. C-h v imagemagick-types. – John Kitchin Jul 30 '16 at 14:21
  • Ah no, it's not on the list. But the macports edition of Emacs relies on the WebKit framework to render SVGs... [Here is a blurb about it](https://bitbucket.org/mituharu/emacs-mac/overview). – Adam Jul 30 '16 at 17:33

0 Answers0