How to config JIRA display inline image/attach image in BEST FIT method?

TrungnEHCVN January 9, 2018

I often take screenshot then paste/attach to issue/comment --> because the image is large, JIRA display it un-friendly.

How to config JIRA display inline image/attach image in BEST FIT method? (as same as paste large image into gmail)display image best fit.png

3 answers

1 accepted

5 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 10, 2018

Hi Ngueyn,

To the best of my knowledge there is not a means to automatically do this in Jira, as there appears to be in Gmail.

However you can adjust the way that image appears in a comment or description field in Jira without directly modifying the attachment itself.

Instead of using the thumbnail tag such as:

!filename.jpg|thumbnail!

You can use other parameters to determine the specific alignment, spacing, as well as the width and/or height of the image as it appears on the page in Jira.

 

To do this you could use a syntax such as:

!filename.jpg|width=400, height=300!

Of course if you specify both width and height this way, and the source image does not conform to the same aspect ratio, you will find that image will look very skewed.

Instead I would recommend just specifying the width, in my testing this seems like Jira is then automatically scaling the height value to keep it proportional, such as this:

!filename.jpg|width=400!

Of course you might want to use a different value than 400.  It really depends on the size of your screen, you other users screens, as well as the aspect ratio of the image itself.

Sorry there does not appear to be such as simple solution as a 'best fit' button for Jira at this time, but I hope that this work-around might help here.

Let me know what you think.

Andy

Chris Chua March 23, 2020

Is it possible for a sensible default such as the width of the text box to be pre-filled as the default width of the image?

For many users that have high-resolution screens, this renders all screenshots unusable.

 

Update: I'm seeing that sometimes thumbnail is the default, but I haven't figured out when.

So I'll clarify here: it isn't the default when I'm using the "Visual" way (instead of "Text") of entering comments and descriptions to a Jira issue. The Visual input causes the most annoyance.

 

4 votes
TrungnEHCVN January 10, 2018

Thank Andrew Heinzer. Your solution is useful but still not convenience and friendly as gmail. (set width size manually + not allow click on resized image to see full size image)

I still hope JIRA will support BEST FIT inline image in future (similar with paste large image in gmail)

Thomas Rijsewijk September 26, 2019
!filename.jpg|width=100%!

Works for me 

Like Albert van Biljon likes this
Bill Bohn March 3, 2020

Where did you add this configuration?

Thomas Rijsewijk March 4, 2020

No configuration, just paste everything in the editor and change the reference to your attachment (filename.jpg to this-is-my-attachment.png). Make sure you include the exclamation at the beginning and the end

2 votes
Thomas Rijsewijk September 26, 2019
!filename.jpg|width=100%!

Works for me. Autoscaling and everything

Chris Chua March 13, 2020

Any way we can suggest to Jira to make this the default?

Like # people like this
Wolfgang Dumke March 29, 2021

Yes, please suggest to Jira to make this the default!

Thomas Rijsewijk March 31, 2021

Doens't make sense, since we're loosing the old issue view the old texteditor will also slowly be phased out..

This is why we can't have nice things

Suggest an answer

Log in or Sign up to answer