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 votes
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 :)

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

all users is what I meant.

0 votes
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
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...

269 views 2 10
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