Hi!
Can anyone help me understand this concept with images in confluence?
I'm publishing 400+ confluence documents to our datacenter confluence server, using the python API, and i would like to add a picture to each document depending on the type of document.
Is there no way i can just upload this once to our space and then refer to it in the xhtml code to show a picture?
Or do i have to use this function for every single document, every time i publish it (every night)?
confluence.attach_file(filename, name=None, content_type=None, page_id=None, title=None, space=None, comment=None)
So the image saved in 400 copies?
...And then use this code to show it?
<ac:image> <ri:attachment ri:filename="logo-distro-debian.png" /> </ac:image>
Can't a picture be shared across a space? And just be referred to?
Hi @Göran Brännström and welcome to the Community.
I've been long removed from on-premise Confluence but transclusion/inclusion should work.
Basically the idea is using the normal GUI, put an image on one page inside an excerpt macro (or its Data Server equivalent). On another page, use insert excerpt (excerpt include) macro and point to the original excerpt.
Then you should just put the code for that insert excerpt code on all pages programmatically.
I think there was a question here where someone mentioned they're doing this on Cloud. (And I was 'hacking' HTML on pages doing the same on Server years ago :) )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.