10

I used to be able to scale down an inline image in org-mode with

#+attr_html: :width 650 px
[[file:~/org/def/202a3-9.jpeg]]

But now it doesn't work anymore, presumably because of an update to 8.3.5. What to do?

  • What you have will scale the images in HTML exports, not in the org buffer. Your lack of info on the org/emacs versions when things worked and the same when things did not work cannot help anyone help you on this. – Kaushal Modi Aug 18 '16 at 12:48
9

set option in your emacs init file:

(setq org-image-actual-width nil)

And add this property upon image link:

#+NAME: fig:figure name
#+CAPTION: figure name
#+ATTR_ORG: :width 200/250/300/400/500/600
#+ATTR_LATEX: :width 2.0in
#+ATTR_HTML: :width 200/250/300/400/500/600px
[[file:./file.png]]
  • I updated my answer. – stardiviner Oct 20 '16 at 16:50
  • I sometimes set the org-image-actual-width on a per-file basis. – dmg Dec 18 '16 at 4:53
  • Is it not possible to set the :width attribute for all formats at once? – AlwaysLearning Jan 30 '18 at 7:12
  • #+NAME does not do anything for me. The label of the figure is still automatically generated... – AlwaysLearning Jan 30 '18 at 7:19
  • You can use Buffer local scope attribute. I don't know is there any option can do this. But you can explore the source code. – stardiviner Jan 30 '18 at 16:06
-2

Some testing seem to show that just adding a space before the # solve the problem. It look like a bug. May be you should report it to the org-list.

  • Oddly that doesn't work for me. – Toothrot Aug 18 '16 at 14:15
  • -- with version 8.3.5. – Toothrot Aug 18 '16 at 14:21
  • I've version 8.3.4 – Rémi Aug 18 '16 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.