Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Finding and managing images for a site can be difficult. This site uses the Attachment Table macro, which is part of the Advanced Tables for Confluence app, to help. It provides a good inventory view and makes finding and removing obsolete images easier. We follow a process where all sitewide (global) images are to be attached to the Images page. These are images that are most likely to be needed on multiple pages or are of a general nature like banners, icons, and other standard image assets. Page specific attachments are often just attached to their respective pages. Sometimes one of these images needs to be used on other pages, in this case, the image should be moved to the global Images page. Duplication should be avoided; specifically, be careful when copying pages with attachments as it duplicates the attachments. 

The Attachment Table macro can also be used to manage general attachments, but this how to focus on images specifically.

...

Table plus
highlightColor #ffffec
rowStylesbackground:#f0f0f0;color:#222;font-size:14px;border-bottom:black 2px solid;border-top:black 2px solid;,
stylebackground-color:white;
autoNumbertrue
enableSortingfalse


Step

Description

Example

Edit the page.

A page with image attachments to be managed.

Images

Add the Attachment Table macro.

Start with the default - showing all attachments to the page with default columns.


Edit the macro.

Modify the parameters below as needed for your situation.


Set the Attachment Table settings > Data settings > Columns to display parameter to a comma separated list of available columns.

The Display thumbnails example has more on this.

Thumbnail is important for images.

Location (or Properties) is important as it provides a link to manage the attachment.

We used: File, Thumbnail, Size, Created, Creator, Location, Comment 

Optionally, set Attachment Table settings > Data settings > Date formatparameter.


We used: yyyy-MM-dd

Optionally, set Column settings > Numbering & Totaling > Insert auto number column.

A row number is convenient for referencing.


Optionally, set Column settings >  Sorting > Automatically sort by this column and Automatically sort in descending order if applicable.

Starting from a specific order is useful.

We used: Created column for sorting with descending selected


Steps for sitewide images

...

Table plus
highlightColor#ffffec
rowStylesbackground:#f0f0f0;color:#222;font-size:14px;border-bottom:black 2px solid;border-top:black 2px solid;,
stylebackground-color:white;
autoNumbertrue
enableSortingfalse


Step

Description

Example

Create a page.

This is your management page for images.

Site images

Add the Attachment Table macro.

Start with the default - showing all attachments to the page with default columns.


Edit the macro.

Modify the parameters below as needed for your situation.


Set the Attachment Table settings > Data settings > Columns to display parameter to a comma separated list of available columns.

The Display Thumbnails example has more on this.

Page is used here since we are searching across multiple spaces and pages, so having a link to the page is convenient.

Thumbnail is important for images.

Location (or Properties) is important as it provides a link to manage the attachment.

We used: spacename, Page,File, Thumbnail, Size, Created, Creator, Location, Comment

Set optional parameters similar to the previous Steps section.


We used the same settings as the earlier example.

Optionally, specify Attachment Table settings > Page filtering > Source (Regular expression) > Filter by space key or space name.

Use this to select the spaces to be included. Leave blank for only covering the current space. Use .* for all spaces.

We used: ((?!(UX)|(User Experience)).)*

This excluded an internal space (by key and name) managed separately.

Optionally, specify Filter by page name.

You may want to exclude images from your global images page if you have one and you manage the images separately.

We used: ((?!(Images)|(Number images)).)*

This excluded our global Images page and the Number images page.

Set the Attachment filtering > Attachment name regex.

You need to select only images on your site. This assumes images are named with a standard extension.

We used: .*(\.png|\.jpg|\.jpeg)


...

(info) Images (global image page) wiki page is a live example of the Attachment Table macro in action.

Other examples

...