In SharePoint 2010, Microsoft made an effort to make our pages more inviting by using people’s profile pictures to identify them throughout the product. They also tried to fix stretching/scaling problems and wanted to provide administrators with an easier way to manage these photos by storing them in a central location. Lets see how SharePoint 2010 manage Profile picture.
The SharePoint 2010 profile picture story:
SharePoint 2010 maintains three differently sized thumbnails of the profile pictures to be used in different contexts in the product. Out of box, it uses the large (144×144 px) thumbnail on the profile page contact card, the medium (96×96 px) thumbnail on the people search results page and the small (32×32 px) thumbnail on various webparts and controls displaying people data like the Newsfeed, Colleagues.
When a user uploads his profile picture using the photo upload UI on the “Edit Profile” page, SharePoint 2010 resize the uploaded image to create 3 thumbnails of above mentioned sizes. There is no need to crop the images but just resize them maintaining the original aspect ratio, so that the largest dimension matches the target thumbnail dimension. If the original image is smaller than the target size, SharePoint 2010 save the small image as the thumbnail instead of stretching it to meet the target. Here are some examples to make this clear:
All the photo thumbnails are stored in a folder named “Profile Pictures” under a Picture Library called “User Photos” under the MySiteHost site collection. Thus, we now have a centralized photo store holding the profile images for every user.
We have the following naming convention for the thumbnail files:
|Thumbnail||Image File Name||Size|
The full URL of the medium thumbnail (like, “ http://<mysitehost>/User Photos/Profile Pictures/<domain>_<username>_MThumb.jpg”) is stored in the user profile database.
SharePoint 2010 expects all the 3 thumbnails to be stored at the same location and follow the above file naming convention. Depending upon the context where the photo is rendered, SharePoint decides what thumbnail size to use and generates that URL from the _MThumb URL
I hope this article will help you understand how SharePoint 2010 handles user’s profile photos and tune your existing photo upload and storage mechanism to work seamlessly with 2010.