HTML Macro in Confluence and image links

I have static html files (javascript was stripped)--they also have a lot of images (with the oroginal path). When I use the macro HTML in a Confluence page and copy the HTML source code within the html macro, I cannot see the image files. I was wondering how to include the images within the HTML page in such a case. The images are present in the page as attachments, but are not picked up by the HTML macro. For example,the html link says "\common\imagename.png", how does the HTML macro handle it? How does it link the image to the attchment in the page? I cannot link the image directly because it is within the html box.

3 answers

I answered this on your earlier post. You need to use the HTML Include macro to display an HTML page, and if your images are referenced through relative addressing, you need to convert them to absolute addresses. You don't need to strip the Javascript either. It should be able to run.

I wrote Html Include Replace years ago, it handles the inclusion of content from Website X, rewriting of all relative URL's to absolute URL's, also, optional inclusion of referred CSS and Javascript. Obviously some care needs to be taken with the above. Its been on my list of things to publish 'to current' for a long time.

Hi all,

I think I have a similar question, basically I want to create a roadmap on confluence page and when mouse hoover over, one part of the map will be magnified.  I have written the html script, however, I do not know how to include my image (the roadmap) in the html.

The images can not be upload to public as it is confidential, so there is no url to put into html script. Can I purely upload those images to Confluence and get its storage directory put into html script? I know in Pentaho, you can just upload the images into Pentaho and put the image save directory within Pentaho into the html scripts, but not sure if I can do this in Confluence.

Any advice please.

scully52013@gmail.com

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,164 views 2 13
Read article

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