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;

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
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,441 views 3 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