How to find an image location in the Confluence 4.0 editor

The image properties panel in the Confluence 4.0 editor does not show the location of the image. By location, I mean the page to which the image is attached, or the URL of the image source. This is a problem especially if, like many technical writers, you put a collection of often-used images in one location and then display them on a number of pages. I’ve found a workaround, though cumbersome. If you have a better one, please let me know. 🙂

In Confluence 3.5, the location was visible in the wiki markup. I’ve logged an issue about the problem in Confluence 4.0: CONF-23945. Keep an eye on that issue for news about possible fixes.

The workaround in brief

  1. Right-click on the image in the editor and select “View Selection Source”. (That is the name of the option in Firefox. Other browsers may word it differently.) You will see the HTML <img> element.
  2. Find the src attribute.
    • If the image comes from an external source, you will see a URL. That’s easy.
    • If the image is attached to a Confluence page, the <src> attribute will look something like this: src="/download/attachments/181535157/1.png. The number in the middle, in this case 181535157, is the identifier of the page to which the image is attached.
  3. Now construct a URL to view the page that contains the image, using the page ID instead of the page name: http://MY.CONFLUENCE.SITE/pages/viewpage.action?pageId=181535157.

A real example with pictures

In our release notes, we use a stylised number to illustrate the highlights of the release. The numbers are images, named 1.png, 2.png, and so on. We store them on a single page and reuse them in all the release notes.

Here I am editing the JIRA 4.4 release notes. I have right-clicked on the image that shows the number 1 in a grey circle:

Right-click on the image

Click “View Selection Source”, to see the HTML for the image element:

HTML for the image element

Grab the long number from the src attribute. In this case, it’s 181535157. That the identifier of the page to which the image is attached.

Construct a URL to view the page that contains the image, using the page ID instead of the page name, and use your magic number for the pageID:

That URL takes you to the page called “_Images for Release Notes“, which is where we store the images for reuse in our release notes:

The page where the image is attached

Notice that you can get to a page via two URLs. One uses the page ID, the other uses the page name.

And voilà, you’ve found your image. 🙂


About Sarah Maddox

Technical writer, author and blogger in Sydney

Posted on 26 November 2011, in Confluence, technical writing and tagged , , . Bookmark the permalink. 2 Comments.

  1. David Simpson has let me know of this Speakeasy extension for Confluence. It puts a new menu item in the “Tools” menu called “Link to Image Parent Pages”. If you select that option, then the images on the page are highlighted and a link appears next to each one, pointing to the image’s parent page.

    Screenshot here:

    Extension here:

    It currently works for images in {include} statements. The code is on Bitbucket, so you can fork it and adapt it as you like.

    Cheers, Sarah

  2. Sarah,

    I’ve updated the extension to appends inline links for all images that are attached to other pages.

    It’s version 1.0 here:

    — Cheers, David

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: