Insert Images from a URL

You can reference images served from any URL (e.g., your blog, an image hosting service, your server, etc.) and never have to worry about downloading the images and putting them somewhere locally.

Image URL targets

Here are a few examples of images that have a URL target:

Example 1. Block image with a URL target
Example 2. Inline image with a URL target
You can find image:[Linux,25,35] everywhere these days.

You can find Linux everywhere these days.

The value of imagesdir is ignored when the image target is a URL.

If you want to avoid typing the URL prefix for every image, and all the images are located on the same server, you can use the imagesdir attribute to set the base URL:

Example 3. Using a URL as the base URL for images
:imagesdir-old: {imagesdir}


:imagesdir: {imagesdir-old}

This time, imagesdir is used since the image target is not a URL (the value of imagesdir just happens to be one).

This feature is included in the AsciiDoc compatibility file so that gets it right, too.