Photo Import for User Profiles in MOSS
Hi all,
Recently, I had a customer that wanted to re-use the security badge photos from the employee's card to the My Site's user profile photos. This way, he can ensure a photo is available for all employees and provide a consistent, uniform size for all photos. But there is a catch: The badge photos are kept as BLOBs in an Oracle database. Well, I guess BDC comes into ur minds? That was our initial though as well but it seems that BDC does not support BLOB data types. This means another approach was needed to get the photos into the user profiles.
So what did we do? Actually, we used a rather classic approach that worked beautifully and was very easy to create:
- Build a simple ASPX page that accepts the employee id in the query string and load only the picture from the DB.
- Create a view that includes the employee's ID and return the constructed URL of the employee's page in the first step.
- Now, create a BDC application definition (use single sign-on to the Oracle DB – the photos should be available to everyone in the organization so no authorization is needed beside the basic authentication to the DB). The BDC will consume the view you've just created.
- Associate the URL to the Profile's Picture URL to the URL returned from the BDC according to the Employee ID.
- Et viola! All pictures are displayed in the profile pages, on My Site etc.
Pretty easy right? And keep in mind it uses only standard functionality so maintenance should be very easy as well! If you're looking for some more ideas and thoughts on this subject – be sure to also check this link: SharePoint/PowerShell 7: Put the User in the Picture – Could be useful.
Bye,
Adir Ron.