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

This widget could not be displayed.

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.

This widget could not be displayed.

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.

This widget could not be displayed.

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
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

475 views 6 6
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