Images Directory and Image Files

Images family directory

A module directory can contain an optional family directory named images.

📂 modules
  📂 ROOT
    📂 images (1)
      📄 a-source-file.gif (2)
      📄 a-source-file.jpg
    📂 pages
      📄 a-source-file.adoc
    📄 nav.adoc
1 An images family directory in a ROOT module directory
2 An image source file

Antora applies preset behavior to the source files stored in an images directory when it generates a site.

Images

Images are resources, such as photographs, diagrams, and screenshots. The source files for images are stored in an images family directory. Antora supports the PNG, JPG, SVG, and GIF (static and animated) image file formats.

An image can be embedded into any page or partial, regardless of the module or component version it belongs to, using its resource ID and an AsciiDoc block image macro or inline image macro. If an image isn’t referenced in an AsciiDoc image macro, its content won’t be published to a site.

Assets

A module directory can also contain a directory named assets. This is an alternate location, recognized by Antora, where the attachments and images family directories can be placed.

📒 repository
  📄 antora.yml
  📂 modules
    📂 ROOT
      📂 assets
        📂 attachments
          📄 a-source-file.zip
        📂 images
          📄 a-source-file.png
      📂 pages
        📄 a-source-file.adoc
      📄 nav.adoc

You don’t need to set the path to these predefined directories in the header of your pages. This is managed automatically by Antora.