Images

Images are source files, such as photographs, diagrams, and screenshots, that are stored in an images family directory. An image can be inserted into any page or partial, regardless of the module or component version it belongs to, using an AsciiDoc image macro. AsciiDoc supports PNG, JPG, SVG, and GIF (static and animated) image file formats.

Block and inline image macros

There are two AsciiDoc image macro types, block and inline. A block image is displayed as a discrete element on a page.

Example 1. Block image macro
This is a paragraph.

image::resource-id-of-target-image.ext[]

An inline image is displayed in the flow of another element, such as a paragraph or sidebar block.

Example 2. Inline image macro
This sentence contains an inline image:resource-id-of-target-image.ext[] image.

Using the xref element attribute, you can reference a page, attachment, element, or even another image from an image embedded in a page.

Example 3. xref element attribute assigned to an image macro
image::resource-id-of-target-image.ext[xref=resource-id.ext]

See Resource Links From Images to learn more.