I recently came across a familiar situation where I needed to synchronize user profiles inside SharePoint 2010 so they will include the profile picture which is defined elsewhere.
Usually users have their pictures included inside the Active Directory either as an extended schema or as a field which holds the URL where the image can be found. These cases are covered and can be easily solved in various ways. One of them is described here (Hebrew) using FIM or here (English) using simple mappings.
My situation was different – my users images were stored on an external HR application which exposed them via a URL which contained a unique identifier of the user. In my case it was an internal employee ID although it could be email, login name etc.
The URL was something like that: http://ourhrapplication/userimage.aspx?employeeid=12345 where 12345 is that unique identifier.
In our case this field was also replicated inside Active Directory under the property “EmpId”.
MY solution for importing the profile images from the external HR system inside our SharePoint 2010 portal user profiles (and My Site) is based on two steps:
1) Powershell script for setting the PictureUrl property of the user profile with the profile image URL of the external system.
2) A powershell command which will resize the image and store it inside the My Site user profile images library.
The script looks something like this:
(I was inspired by a similar solution which also describes updating user profile properties via powershell)
The second step is to run a powershell command which is already provided by SharePoint:
Update-SPProfilePhotoStore –MySiteHostLocation “http://intranet/my/”
(You should run this command from the SharePoint management shell)
This command will go through all user profiles and update the images thumbnails according to the URL we defined in the previous step.
More on this can be found here: SharePoint 2010, Office 2010 and profile pictures. (This post will also direct you to your next stop – embedding profile pictures in exchange 2010 and Outlook 2010)