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
- 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.
- 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.
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:
Click “View Selection Source”, to see the 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: http://confluence.atlassian.com/pages/viewpage.action?pageId=181535157.
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:
And voilà, you’ve found your image.🙂