(JIRA) User profile image in email notifications does not show in outlook email

This icon is displayed instead of the user profile image in Microsoft Outlook, I need to show the user picture in emails being sent by JIRA. Does this has any thing to do with JIRA based URL or needs adjusing pathes? because JIRA support notifications emails the user profile images are displayed in Outlook but our JIRA not!!

(Note: This happens only if image is custom)

7 answers

2 votes

The problem we've established is that you can only view avatars if you have authenticated to jira. This will only work seamlessly if you're using SSO and probably Outlook.

IMHO this is a bug... the easiest solution is to modify com.atlassian.jira.avatar.AvatarServiceImpl#canViewAvatar to just make it return true, which would let anyone view avatars whether they are logged in or not.

1 vote
Susan Hauth Community Champion Mar 20, 2012

Hi,

Had the same problem and found out it's because this seems to only work when I'm logged into IE in JIRA. S

Hi Susan,

I have a workaround and not a solution to show users profile images in outlook, because it seems its a security problem in the AvatarServiceImp class in JIRA com.atlassian.jira.avatar.

THIS workaround is considered part of customization you can make on the email templates and email macros used in JIRA. you can find more details here:
http://confluence.atlassian.com/display/JIRA/Customising+Email+Content


A workaround:


1. Create a new folder name it users-avatars and copy all user profile images to it, create this folder in
..(Jira home)\Application Data\JIRA\data\users-avatars

2. If you installed JIRA standalone as a service, Open the macros.vm file located at
..\Atlassian\JIRA\atlassian-jira\WEB-INF\classes\templates\email


3. Take a backup of the file, then edit the file using your favorite editor probably notepad++ and not notepad


4. inside macros.vm scroll down and find this section: #macro (emailbanner.. it looks something like below


#macro (emailbanner $actionerUser $verbkey $verba1 $verba2 $verba3)
<table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="width:100%;">
<tr valign="top">
<td style="color:${textSubtleColour};font-family:${textFontFamily};padding:0;">
#if ($actionerUser && $avatarService.isUserAvatarsEnabled())
## TODO at the moment, an avatar appears only if avatars can be seen by anon (null) users fixthis
<div>

<img id="email-avatar" src=http://your-jira-server/jira-cust/${actionerUser.name}.jpg"

5. Locate the html element img email-avatar. What I did I replaced the dynamic url lookup code, with this URL to the folder you just created to store all employees images.


> The ${actionerUser.name} will return The user name of the user who made the action, this name usually is the name used to login to JIRA.


6. You need to rename all profile images with their username.jpg or .png depend on the type of images you have. Make sure you have them all the same image extension in order for the URL to work.


7. Resart JIRA

Let me know if this helped you in your case and if you have any question.

Wajd Haikal

Has anyone tested this? I will test this tomorrow.

Thanks


Darren

I don't know if I'm the only one who faces such a problem, is this a bug or I need to do some configuration??

Please don't ignore this message.

Whats the URL of the image you are given in the email?

Its the JIRA avatar of the user

<img id="email-avatar" src="http://devserver6:8080/secure/useravatar?avatarId=10122" alt="" height="48" width="48" border="0" align="left" style="padding:0;margin: 0 16px 16px 0;">

This is what I got from email HTML

Andy Brook ..FYI after trying, I noticed that avatar is shown only if the user in within Internal-JIRA directory, it seems that the velocity template is reading a URL that validates against jira-internal direcory users and is not working on other directories like LDAP or Delegated-LDAP.

Your feedback please

Both returns different URLs for the image:

Internal User:

<img id="email-avatar" src="http://devserver6:8080/secure/useravatar?avatarId=10102" alt="" height="48" width="48" border="0" align="left" style="padding:0;margin: 0 16px 16px 0;">

if ExternalUser

<img id="email-avatar" src="http://devserver6:8080/secure/useravatar?ownerId=mhaykal&amp;avatarId=10400" alt="" height="48" width="48" border="0" align="left" style="padding:0;margin: 0 16px 16px 0;">

till nowe I did no get an answer to this question??

You sound to have a clear test case, I would raise this with atlassian support, as diagnosing it is likely to be not trivial.

You should login to support.atlassian.com, use your SEN, they have a JIRA just for support like this.

How can I track the issue? after that if they replied with a solution to this case or if hey need time to test it?

We have the same problem here with Thunderbird. The URL in the email works if you paste it into a browser, but viewing the actual email just displays the generic user icon.

Works for me in Gmail, but not in Thunderbird (The URL in the email works if you paste it into a browser, but viewing the actual email just displays the generic user icon).

Any update on this? We have the same case, not seing user's avatars in Outlook but working fine with GMAIL for exmaple.

Thanks,

Olivier

0 vote
Andy Brook Community Champion Aug 21, 2013

If you happen to be using JEMH, there is an option in current releases to inline Avatar images. This means they are not then subject to authentication, and will be rendered on all mail clients.

If you happen to be using JEMH, there is an option in current releases to inline Avatar images. This means they are not then subject to authentication, and will be rendered on all mail clients.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

310 views 4 9
Read article

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