how to disable image preview

As I'm creating a page with a couple images I found that some small images with actual pixel size on the page still can be clicked to be viewed in an image preview where they show in exactly the same size!

Which is super pointless... If you actually make the image bigger on the page it will end up smaller in the preview!!! So of course: Those ones don't need to be clickable!! How to turn that off?

here in the comments Magali Sourbes asks:

  • "Is there a way to turn off the "preview" feature ..." (also asking to download... wth.. however)

But the reply was:

  • "Hi Magali,

    Not that I'm aware of (at least without breaking other stuff). You could try asking in answers."

So here I am! haven't found anything solid yet. But I actually have a workaround! It's a bit hacky but at least it works: use HTML macro to show the image! on you page you want to edit:

  1. hit e for edit mode
  2. add the image like always (type ! and select it ...)
  3. right click the image and somehow get the code
    1. View Selection Source is quite nice. If you're indenting make sure you copy the <p> tags too
    2. or in Inspect element right click on the <img> or surrounding <p> and hit Copy Outer HTML
  4. get rid of all attributes but src, height, width and thier values. You might wanna keep title too.
    1. doing this might be easier in Notepad++ or similar with XML syntax highlighting...
  5. Copy the html code
  6. Goto the spot where you want to insert the image
  7. Press Ctrl+Shift+A do open macro selection popup
  8. type htm.. and the html macros should show up already
  9. select the html macro via mouse (there is no way of selecting it with keyboard sad)
  10. Press Insert
  11. Paste cleaned up <img> code in there
  12. Save to see the effect (Image Preview popup is always off in Page Preview sad)

So .. I just saw: You might also use the HTML img macro! But still:

Having a checkbox:

[  ] show in Image Preview Popup

would be quite nice! Or even having small images with actual pixel size not popping up in a preview..

3 answers

1 accepted

This widget could not be displayed.

Do you know https://answers.atlassian.com/questions/116396 which has some more ideas?

Additionally, you can do this (not perfect either):

  • Click image
  • Click "Link" in the opening tab
  • Add a "#" at Advanced > Link:
This widget could not be displayed.

Ah nice! But it needs to be #1 huh? Only "#" will reload the page it seems :/

That's pretty good already! Much much less work that way! Thank you!!!

This widget could not be displayed.

I wrote a user macro for this - it just creates an <img> tag based on the name of an attachment you specify.

## Macro Name: simple-image
## Macro Title: Simple Image
## Body processing: No macro body
##
## Author: Richard Gee
##
## @param Attachment:title=Attachment|type=string|required=true|desc=Name of attachment to show
##
#set($attach = $attachmentManager.getAttachmentDownloadPath($content, $paramAttachment))
<img src="$!attach" />

Just attach the image in the normal way, but then delete the standard image control and use the one above to display it instead.

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

345 views 2 5
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