Can I collapse images on a page?

there are several images on a parent page. I want to collapse so they are not seen by a user. Can I do that? The image macro doesn't seem to have that capability.

Can someone please comment an answer for this question? Thank you.

6 answers

If you put images inside the "expand" macro, they won't be displayed on the page until the user chooses to expand the hidden page elements.

There are a ton of them. I don't want to have to remove them from where they are and then put them back in under another macro...a lot of work there.

0 vote
Timothy Chin Community Champion Jul 10, 2014

they are not seen by a user

By a specific user or all users?

Jo Jennifer,

If you want to hide it, you can stylized them via CSS and display:none;

If you want to set, who can see it, you can use hide macro from ServiceRocket :) https://docs.servicerocket.com/display/VIS/hide-if

when you say stylize them via CSS and display:none, can you elaborate? Or give me the step by step process to do that? Thank you.

On space, where you want to hide something go to space tools and there find Look and there Stylesheet. There you can edit CSS. So if you want to disable images, you have to know what type. You can use Developer tool, in Chrome, right click on image and show code (check element)... Here you will see HTML tags for it and some class or id, for that you can write css and hide it :) For more info how using css read this web pages http://www.w3schools.com/css/default.asp

all users is what I meant.

0 vote
Davin Studer Community Champion Jul 10, 2014

If you want to easily put expand macros around each you can use the Confluence Source Editor to do this. It has find a replace capability. So you would do two find and replaces. They would look like this ...

First Find and Replace
Find: <ac:image>
Replace: <ac:structured-macro ac:name="expand"><ac:rich-text-body><ac:image>

Second Find and Replace
Find: </ac:image>
Replace: </ac:image></ac:rich-text-body></ac:structured-macro>

This will put an expand macro around each image allowing you to individually expand or collapse them. Depending upon how many images you have on your page this could be client browser intensive.

I'm trying to use images as the title for an expand so that when a user clicks on the image, it expands with more information. I tried using the Source Editor to replace the title of the expand with the image but that didn't work. Any ideas?

I'm also really wanting to do this, hoping that someone finds a way.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

253 views 11 10
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