Finding pages that link to an attached image

In the spirit of encouraging content re-use, we are considering using an image library page in each space to hold all the images related to a product we are developing. The creators of our various documents (user guide, admin guide, etc) would insert images into their content that linked to the images attached in this library. The issue we are discovering is that, if an updated image is uploaded, we don't have an easy way of finding where the image is referenced to ensure that any content around the image is still valid.

For example, we have a login screen image and the text in the User Guide and the Admin Guide say to click the red button to login. If the login screen is updated so that the button is green and the new image is uploaded to the library, we have 2 documents that now have to be rechecked to make sure the wording is corrected. We're looking for an easy way to identify which documents reference the login screen image.

Is this possible? I'm guessing it isn't and that we should just attach the login image directly to each guide and just use manual tracking of where it is used so that we update the image everywhere it is used. (ie, no content re-use).

Any other suggestions?

1 answer

1 accepted

Hallo Steven

Great question! In Confluence 4.0 and later, it isn't possible using the standard Confluence UI to find the pages that reference an image attached to another page. The reason is that the image name is hidden from the search, inside a custom element in the Confluence storage format. (In Confluence 3.5 and earlier, you could search the wiki markup.)

Here's a workaround, in case it appeals to you: Embed the image into the page where it's attached, then use the Include Page macro (or the Excerpt Include macro) to include the image (i.e. the page content) on another page.

You can find all pages that include another page, using the special "wikiMarkup:" argument in the Confluence search. First, you'll need to install the Macro Indexer plugin. See this blog post:

On another note: It's possible that the Confluence CLI may offer a full search of the new markup. Bob Swift will be able to answer that one:

I hope this helps!

Cheers, Sarah

Thanks Sarah, since the excerpt macro is still limited to one per page (I believe), that still wouldn't give us the ability to have a single image repository. I think we'll keep looking for something else. :-)

Hallo Steven

Just to clarify, for other readers too. :)

Yes, the Excerpt macro is limited to one per page. So you'd need to have a separate page for each image in the inclusions library.

When using the content, it is possible to have more than one Excerpt Include macro per page, so you could include many images on each page that the readers see.

Cheers, Sarah

Great - I'll work with my teams to see if having a library of pages with embedded images will do what we want. I'm sure I can look this up but, since I'm already here typing - would/could the excerpt-includes be relative so that we could move the image page and the content page to a different space and, assuming the structure is the same, the link would work? We have a need (for configuration management purposes) to control both document and image versions at release time. Being able to copy the document and supporting image pages to a CM space would be helpful.


Yes, the Excerpt Includes are relative, provided that you haven't specifically added the space key to the link. We use this fact when we copy a space to a new space at release time, for version control.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,321 views 93 8
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you