SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do you get the user profile picture from an SPUser profile?

share|improve this question
do you need some kind of permissions to get the pictures of other users than yourself? I only get my own picture. – Gene Vangampelaere Feb 17 '12 at 13:09

You can look at the User Information List, to grab the Picture column contents. It's a hidden field, so you might have to write a console app to get the columns, or find a reference somewhere online.

Tobias Zimmergren did a blog post on getting user data from the User Information List from an SPUser object:

share|improve this answer

You can do something like this:

public string GetUserPicture(SPSite site)
    string userAccount = "domain\\account";

    ServerContext ctx = ServerContext.GetContext(site);
    UserProfileManager upm = new UserProfileManager(ctx);
    UserProfile up = upm.GetUserProfile(userAccount);

    return  up["PictureUrl"].Value;
share|improve this answer
tarjeieo : when user do not have change his profile picture that time it gives error. can we have some check on pictureUrl? – love thakker Jul 11 '14 at 13:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.