Want to know how to recover user profile picture


while running a query i am able to find the "attachment" table where this is store.

i want to is the if this content type is "image/pjpeg" how it is diaplying on confluence page. basicaly i want to know where i can get this picture on confluence. there should be something like space id. please let me know.



2 answers

0 vote
Stephen Sifers Community Champion Mar 26, 2014

I found myself trying to find user avatars as well, I was able to use the following macro to place a users login avatar on pages:

#set( $profile_pic = $userAccessor.getUserProfilePicture( $req.userPrincipal.name ) )
#set( $pic_src = $profile_pic.getDownloadPath() )
<img src="$pic_src" alt="Your profile picture" />

Now when I need to have an avatar loaded on a page, I just add the macro.

Not sure if this answers your question though.

Hi Stephen,

Sorry for the late response, i was on vecation.

actually my requirement is, on confluence some user update their profile picture but for others it display the default picture. now, we are planning to update all the profile picture. how can we do that?



Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

370 views 20 10
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