12.7.1 Images

An image is a link to an image file124 that does not have a description part, for example

./img/cat.jpg

If you wish to define a caption for the image (see Captions) and maybe a label for internal cross-references (see Internal Links), make sure that the link is on a line by itself and precede it with ‘CAPTION’ and ‘NAME’ keywords as follows:

#+CAPTION: This is the caption for the next figure link (or table)
#+NAME:   fig:SED-HR4049
[[./img/a.jpg]]

When link previews are displayed as images, the image size and alignment can be further customized.

By default, Org mode displays inline images according to their actual width, but no wider than fill-column characters.

You can customize the displayed image width using org-image-actual-width variable (globally) or ‘ORG-IMAGE-ACTUAL-WIDTH’ property (subtree-level)125. Their value can be the following:

org-image-max-width limits the maximum displayed image width, but only when the image width is not set explicitly. Possible maximum width can be set to:

Org mode can left-align, center or right-align the display of inline images. This setting is controlled (globally) by org-image-align. Only standalone images are affected, corresponding to links with no surrounding text in their paragraph except for whitespace. Its value can be the following:

Inline image alignment can be specified for each link using the ‘#+ATTR.*’ keyword if it matches an alignment specification like:

#+ATTR_HTML: :align center

Org will use the alignment specification from any ‘#+ATTR.*’ keyword, such as ‘#+ATTR_HTML’ or ‘#+ATTR_LATEX’, but ‘#+ATTR_ORG’ (if present) will override the others. For instance, this link

#+ATTR_HTML: :align right
#+ATTR_ORG: :align center
[[/path/to/image/file.png]]

will be displayed centered in Emacs but exported right-aligned to HTML.

When ‘#+ATTR_ORG’ is not set, inline image alignment is also read from the ‘:center’ attribute supported by some export backends (like HTML, LaTeX and Beamer.)


Footnotes

(124)

What Emacs considers to be an image depends on image-file-name-extensions and image-file-name-regexps.

(125)

The width can be customized in Emacs >= 24.1, built with ImageMagick support.