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

This widget could not be displayed.

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.

This widget could not be displayed.
Timothy Chin Community Champion Jul 10, 2014

they are not seen by a user

By a specific user or all users?

This widget could not be displayed.

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

This widget could not be displayed.

all users is what I meant.

This widget could not be displayed.
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.

This widget could not be displayed.

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
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

409 views 4 6
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