Linking to image in the export doesn't work but it does on the server

I'm setting up templates & processes to prepare our documentation on the server for delivery in the exported HTML format.

When viewing the page on the server in Confluence I can click on images & be taken to their source, but in the export there is no link.

How does confluence handle these links if they aren't in the exported HTML? Does it use the data-image-src tag somehow? My export looks like this;

<p><img class="confluence-embedded-image" src="attachments/1179860/1310774.png" data-image-src="attachments/1179860/1310774.png"></p>

If it helps I have a demo available; http://dl.dropbox.com/u/3755926/cssTricks/main.html

1 answer

If I understand your question correctly, the thing that makes images "clickable" is the anchor tag. I recommend to compare the DOM between your display and export template, and add the anchor tags to your export as well, making the images clickable.

Yeah I was about to setup a bit of jQuery to bind things together & create the link that way, but I wasn't sure if you could do something with the editor to get confluence and/or the export process to do this for you to save me the job.

Do you know what I need to search the docs for on editing the export? I've found docs on customising the PDF export, but not HTML. I'm not sure if I have access to that at the moment, but its something I have been wanting to look at. Thanks :)

Are you exporting via Space Admin or via plugin that uses the "Tools" menu?

From the advanced part with space admin as the tools plugin doesn't work correctly.

I've got my JS setup, but as I say, it would be easier to get as much as possible done by the export process, like adding my custom style sheets, js links etc.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,538 views 25 14
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