14

I'm talking desktop browser experience, e.g. chrome. In jira, if I attach the image I can use it in my comment - and it's great! I usually use width=800px so the whole image can be seen in the comment.

So I can write something like this:

Here's the screenshot

!my-screenshot-image.jpg|width=600px!

The problem is that sometimes screenshot is too big and when shrunk to smaller size, e.g. 600px, is not readable.
When you click on the image in attached files area then it pops up and this is what I want in the comment section.

I was wondering if there's any parameter that would make it happen? Is there a list of parameters that can be used when "embedding" image somewhere? I only seem to find width parameter.

P.S. When you open jira ticket on mobile - it looks fine and image is actually clickable - when you click on it it opens up a page with just image in it.

user1249170
  • 469
  • 1
  • 5
  • 14

2 Answers2

17

You want this to allow a small image in the comment to be expanded into a larger light box view:

!my-screenshot-image.jpg|thumbnail!

Per the source for JIRA 6.3, the following are also valid attributes for images:

align
border
bordercolor
alt
title
longdesc
height
width
src
lang
dir
hspace
vspace
ismap
usemap
id
class
Scott Dudley
  • 3,256
  • 1
  • 18
  • 30
  • thumbnail is a great option to know and thanks for hinting this - I'm sure will be using this. But unfortunately it doesn't work with width=XXXpx. So what I'm saying this wouldn't work: `!my-screenshot-image.jpg|thumbnail|width=600px!` – user1249170 Jan 14 '15 at 20:58
  • 5
    The correct syntax for that is `!my-screenshot-image.jpg|thumbnail, width=800px!`, although it probably doesn't do what you want (generate an 800px upsampled version of a low-res thumbnail :-( ). – Scott Dudley Jan 14 '15 at 21:05
  • Well, this is great to know anyway! – user1249170 Jan 14 '15 at 21:13
  • 1
    I just added a list of the other acceptable attributes for images, since your question mentioned wanting a reference for those too. – Scott Dudley Jan 14 '15 at 21:42
  • Thanks Scott, much appreciated. Is there link you could share e.g. Jira documentation or usage scenarios? – user1249170 Jan 14 '15 at 21:46
  • Except for thumbnail, I believe they are all [HTML attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img). – Scott Dudley Jan 14 '15 at 21:53
  • If you really care to dig in and if you are a JIRA licensee, you can download the JIRA sources from your my.atlassian.com account. Some relevant files are `jira-project/jira-components/jira-core/src/main/java/com/atlassian/jira/issue/fields/renderer/wiki/embedded/JiraEmbeddedImageRenderer.java`, and from within `dependencySources/atlassian-renderer-X.Y.Z-sources.jar`, `com/atlassian/renderer/embedded/EmbeddedImage.java`. – Scott Dudley Jan 14 '15 at 21:57
-1

This one works for me.

!my-screenshot-image.jpg|thumbnail, width=800px!

Dale K
  • 25,246
  • 15
  • 42
  • 71
  • 2
    This appears to just copy the above answer. What does this answer provide that the other doesn't? – Blue Jan 22 '19 at 22:49