This blog posting applies to Microsoft Office SharePoint Server 2007 and Microsoft SharePoint 2010.
MOSS user profiles have a property called Picture, which can store the URL of an image file. When this property is filled in, other MOSS features display the user’s picture at useful times: in search results, or on a My Site. But where’s the image file stored? It depends on whether My Sites are enabled or not.
If My Sites are enabled, then the profile editing page provides a “Choose Picture” control that allows you to easily upload a picture to be associated with your profile: just click the control, browse to a picture on your PC, and click Ok. This control uploads the image file, stores it into the Shared Pictures library of your My Site, then copies its URL into the Picture property of your profile.
But what if you haven’t created a My Site yet, or if My Sites are disabled?
If you haven’t created a My Site yet, then chances are you won’t be on the profile editing page. The typical path to get to the page where you choose a picture is to go to your My Site first. If you have no My Site, it will be created for you at that time. From there, click the Detail link on My Site to edit your profile information. But it’s still possible you could get to this page without going to My Site first. In that case, either My Sites are disabled (see next case), or you got here by entering the URL directly. In that case, you’ll see an error message in the upload control indicating that you don’t have a My Site yet.
If My Sites are disabled, you can still browse to http://mysite/Person.aspx to view your My Profile page, then click the Details link to edit your profile data including Picture. This time, the Picture field is still present, but the “Choose Picture” button is gone. In its place is a plain text field, so you can enter the URL of an image file. This means you have to upload the image file to a site you can access, then copy its URL into this field. This is probably not the smoothest experience for most users.
Administrators planning to disable My Sites should be aware of this, if they’re also planning to allow users to edit their profile. One choice might be to edit the behavior of profile properties via Central Admin to lock the My Picture field against edits, or even hide it completely if desired.
How profile pictures are stored has been changed from Office SharePoint 2007 to SharePoint Server 2010. Instead of storing the profile picture inside each user’s personal site, SharePoint Server 2010 stores all profile pictures in a central picture library (http://<mysitehost>/UserPhotos). When a picture is uploaded, SharePoint will automatically create the following resized versions:
· 32×32 (for general use in SharePoint Server 2010).
· 48×48 (for Active Directory Domain Services (AD DS) and client applications).
· 96×96 (for the My Profile page).
The Picture Picker control used by SharePoint Server 2010 can be customized or replaced to support custom picture storage policies.
The profile pictures will be synchronized with Active Directory (AD) Directory Services (DS). If the picture already exists in AD, it will be pulled into the user profile database. Otherwise, the picture will be written back into AD if this reverse synchronization is configured in SharePoint Server 2010.