List the images attached to the current page

List the images attached to the current page

Let's find all the images that are attached to the current page and list them in a table.

Result

Ingredients

Apps

Reporting for Confluence Data Center

Macros

Expanding Reporter, Local Reporter, Report Column, Report Empty, Report Image, Report Info, Report Table, Text Sort

Suppliers

Content Supplier, Expanded Supplier

Macro structure

You can recreate the example in the editor view:

Guide

  1. Create a Report Table macro.

  2. Within that Report Table macro, create an Expanding Reporter macro with the following parameters:

    • Key: content:images

    • As: at

  3. Within the Expanding Reporter macro, create a Local Reporter macro with Key: @self.

  4. Within the Expanding Reporter macro, under the Local Reporter macro, create a Text Sort macro with Key: attachment:title.

  5. Within the Report Table macro, under the Expanding Reporter macro, create a Report Column macro with Title: File Name.

  6. Within the File Name Report Column macro, create a Report Info macro with the following parameters:

    • Key: expanded:at > attachment:file name

    • Link to Item: selected

  7. Under the File Name Report Column macro, create another Report Column macro with Title: Image.

  8. Within the Image Report Column macro, create a Report Image macro with the following parameters:

    • Key: expanded:at

    • Height: 100px

    • Width: 100px

  9. Under the Image Report Column macro, create a Report Empty macro.

  10. Within the Report Empty macro body, enter No files have been attached to this page.