How to disable the full-size image option when clicking on an image

Javier Olazaguirre December 16, 2012

Since version 4 of Confluence, when I add an image, it can always be clicked and it will pop-up in full-size. For certain image this is useful, but I have many images that I don t want to have this behavior (titles done as image instead of text or logos).

Is there an option to enable/disable this functionality for each image?

Thank you!

3 answers

6 votes
Chung Park Chan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 17, 2012

There are three ways to do this:

1. Through stylesheet "trick" where it changes the "point" to normal cursor when hovering over an image.

.confluence-embedded-image { 
  cursor: default !important; 
}

2. Add Custom HTML in Confluence Admin >> Look and Feel. This will disable all images to be enlarged when you click them (applies Globally).

<script type="text/javascript">
   
 AJS.toInit(function() {
 // unbind directly-embedded images
 AJS.$("img.confluence-embedded-image").unbind("click.fb");
 });
 </script>

3. Enable HTML Macro. Then insert the below html macro in a page where you wish to disable the full-size image option (applies only to particular pages that has the macro embedded).

<script type="text/javascript">
 
AJS.toInit(function() {
  // unbind directly-embedded images
  AJS.$("img.confluence-embedded-image").unbind("click.fb");
 
 // unbind the gallery macro
  AJS.$("a.gallery-link").unbind("click.fb");
 
 // unbind the attachments macro
 AJS.$(".attachments a.filename").unbind("click.fb");
});
</script>

Hope this helps.

Javier Olazaguirre December 17, 2012

Hi, thanks.

I just linked the image to a bogus anchor, so didn't create any anchor but still linke the image to #1 (for example). Maybe is not as professional, but gets the result.

Ran Liu January 16, 2015

What is the "click.fb" mean? Is the .fb something special with Confluence?

hprt August 13, 2015

Thanks for the tip Javier! Since I don't have admin rights on company confluence, this was the only way I found that allows me to disable the image popup: [!http://link.to/image.png!|#bogusanchor]

Nicolas Casel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2016

Hi @Chung Park Chan ,

The snippet code you provide as the 3rd option does not work. Maybe it is outdated?

0 votes
Timothy Vattima October 9, 2014

I did something a little different than the above solutions.

First I created a new page in my Space. On this page, I just attach images that will be added as an HTML Image to other pages in the space.

On a page where I just want a plain-old image, first I right-click on the URL of the image I want that is sitting on my "Images" page, then in the page I am editing, I paste-in the URL, set the correct image width and height, and viola! You just get an image - not clickable, no popup....just an image.

0 votes
Ken Poulton March 28, 2013

I'd like to get thumbnails displayed (full size) in a popup window instead of the fancybox popover. Is there some way to rebind these to popups instead of simply disabling them?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events