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

wajdhaikal
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 3, 2012

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
JamieA
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.
April 26, 2012

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 _Jira Queen_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 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

wajdhaikal
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 21, 2012

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

wajdhaikal
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 21, 2012

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

Wajd Haikal

Darren Pegg October 15, 2012

Has anyone tested this? I will test this tomorrow.

Thanks


Darren

0 votes
Andy Brook [Plugin People]
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.
August 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.

0 votes
Andy Brook
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.
August 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.

0 votes
Olivier Gwynn June 25, 2013

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 votes
Andy Brook [Plugin People]
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 4, 2012

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

wajdhaikal
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 4, 2012

Its the JIRA avatar of the user

wajdhaikal
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 4, 2012

<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

wajdhaikal
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 4, 2012

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

wajdhaikal
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 4, 2012

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;">

wajdhaikal
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 5, 2012

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

Andy Brook [Plugin People]
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 7, 2012

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

Andy Brook [Plugin People]
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 7, 2012

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

wajdhaikal
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 7, 2012

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?

Alex Taylor
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.
April 26, 2012

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.

Adolfo Casari
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.
August 7, 2012

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

0 votes
wajdhaikal
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 4, 2012

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.

Suggest an answer

Log in or Sign up to answer