21
qr-code

Adding an image into a post

Adding an image to a post is pretty simple since Org-mode offers a special link scheme for that. Image source file can be stored anywhere since its path is valid. During the export process, the image file is copied into a folder related to the post and all links are corrected to point to its new location.

For example, the following piece of code will copy the emacs-logo.png from the current directory and is is then copied into it into tips/2012/08/21_adding-an-image-into-a-post/emacs-logo.png.

file:emacs-logo.png

../../../tips/2012/08/21_adding-an-image-into-a-post/emacs-logo.png

The HTML result is something similar to:

<img src="21_adding-an-image-into-a-post/emacs-logo.png"  alt="21_adding-an-image-into-a-post/emacs-logo.png" />

A best practice is to have all files info a /files folder. Then you can create a sub-folder for each posts such as:

blog comments powered by Disqus