Search code examples
imageorg-mode

How do I re-scale inline org-mode images to specific widths?


The following signifies a picture in org-mode that is scaled to size width="300". When I preview my document in a browser, the image is successfully re-sized to 300px width; however, when I preview the images inline using C-c C-x C-v (i.e., org-toggle-inline-images), the image is displayed but fails to be resized to width 300px.

#+ATTR_HTML: width="300"
[[file:/path/to/picture.png]]

Question: How do I re-scale inline org-mode images to specific widths?


Solution

  • For recent versions of Org:

    #+ATTR_HTML: :width 300
    #+ATTR_ORG: :width 300
    [[file:/path/to/picture.png]]
    

    The syntax for ATTR_HTML is the same as the other property lists.