Contact Photos in Lync 2013, Because Image is Everything

Things have changed slightly regarding contact photos in Lync 2013 in comparison to previous incarnations, and we have a few extra features & settings available to us. What hasn’t changed are the types of points we need to consider when implementing contact photos across our organisation; where we are going to host our images, how we are going to import those images, consideration of user privacy, and the level of control our end users should have etc. NOTE: Lync 2013 Client Update KB2825630 has reintroduced the ability to manage photos through web URL’s. To that end, all reference’s in this post regarding the lack of this feature in 2013 should be read with this in mind.

Contact Photo Locations

Historically contact photos have been stored in one of two places; within the Active Directory ‘thumbnailphoto’ attribute for a given user object, or via a web server URL. The Active directory option is available to us again in Lync 2013, but as before is only able to host images no greater than 96×96 pixels in resolution, and also has a 100KB size limit for said image. Naturally this looks fine in the Lync client contact list, but results in a blurred photo experience when Lync attempts to upsacale the image for use in a conference for example. The second option of referencing a photo via a web server URL is still available in Lync 2013, but the ability to configure and manage this setting no longer exists in the new Lync client, we’ll look at this in further detail shortly.

We now have a third option available to us with Lync 2013 – the ability to host our images in the mailboxes of an Exchange 2013 server. What’s more, these images do away with the aforementioned size constraints of AD and allow us to leverage Hi-Res photos with a resolution of 648×648. It’s important to note that this feature is not available in previous Exchange versions due to the lack of any Open Authentication standards on those editions. If you’re not using Exchange 2013 then your options are restricted to the AD and web server photo hosting solutions.

OK, now we’re familiar with our options, lets look at each of them in more detail.

Contact Photos via Active Directory (AD)

Any photo that you import into the ‘thumbnailphoto’ attribute of a user object in active directory will appear directly in Lync as that users contact photo. To view the attribute that we will be modifying, open up Active Directory Users & Computers and locate the user account that you wish to modify. You will need to turn on ‘Advanced Features’ from the view menu, and then look at the properties of the user account. Select the attribute editor tab and scroll all the way down to ‘thumbnailphoto’. The below images show a before import and after import state of the attribute – Note that you are not able to see the actual image from within AD.

thumbnailafter thumbnailbefore
The Microsoft method of importing photos into AD is to use the Exchange cmdlet ‘Import-RecipientDataProperty’ with the appropriate switches. The process is far from streamlined when if comes to importing many photos at once. Fortunately the ‘See a Need, Fill a Need’ philosophy has come into play, and there are more third party AD Photo Import tools than you can shake a stick at. A quick Google-whack will provide you with an appropriate tool for the purpose, such as Code Two Active Directory Photos or
AD Bulk Image Editor to name a few, all of which offer friendly GUI’s. Be aware that a standard user (providing they have install rights for software) can also use these tools to change their own AD picture due to the inherent rights they have over their own attributes.

Once you’ve imported your Contact Photo into AD, the image will appear immediately in Lync (you will need to sign out and back into Lync). As an AD hosted photo the image will be at 96×96 resolution, and Lync will attempt to scale this image up as required for conferences etc. The image to the left shows how image blur will occur the more Lync attempts to increase its resolution as required.


Keep the following points in mind if you choose to host your contact photos in AD:

1.) Your images should be 96×96 resolution
2.) An AD hosted photo will not been seen by external / federated contacts
3.) Each image can be no more than 100KB in size
4.) ‘Import-RecipientDataProperty’ has a 10KB limit despite ADs 100KB limit
5.) Large enterprises should consider the impact on the size of their AD database
6.) AD photos will not meet all the resolution requirements that Lync will leverage
7.) By default, any user has permission to change their own AD thumbnail attribute

Contact Photos via Web URL

Lync will allow you to publish images to a web server directory, and then configure a Lync account to reference that image URL as a contact photo for a user. In Lync 2010 the URL could be configured from within the Lync 2010 desktop client, this feature was initially removed from the Lync 2013 desktop client, but the underlying functionality still present. In short – you could still use web URLs for contact photos, you just couldn’t configure them using the 2013 client. The below images show the difference between 2010 (left) and 2013 (right) ‘My Picture’ options, and how the web address option has been removed. As a side note the greyed out ‘Edit or Remove Picture’ button only becomes active if you are using Exchange hosted photos, the final option we’ll look at shortly.

contactphotooptions2010 contactphotooptions2013
So, we have an issue if we want to leverage this in an environment that consists of 2013 clients, as the setting doesn’t exist in the client options menu. Granted, you can install a 2010 client solely to configure this setting and then uninstall it and the photo will stick for your 2013 client. In the same vein, if you had a contact photo configured via web URL on your 2010 client and then upgraded to 2013, you won’t lose the photo – you just won’t be able to see or change that URL anymore – far from practical. Further disappointment comes from the fact there is no ‘out of the box’ way to deploy URL referenced contact photos en masse, so you would need to do this on an individual basis.

Fortunately the community has been hard at work (again), and there are a number of scripts available that will address both of the aforementioned short comings. xilxyu’s Add-CsPhoto is one such script that also allows you to reference a CSV file for working with a large number of users.

Keep the following points in mind if you choose to reference URL’s for contact photos:

1.) If you want external / federated contacts to see your photo you can use this method
2.) The size limit is dictated by the ‘MaxPhotoSizeKB’ attribute in the Lync Client policy
3.) The default value of the above attribute is 30KB
4.) You are not restricted in image resolution outside the ‘MaxPtohoSizeKB’ limit

Contact Photos via Exchange 2013

New to Lync (and Exchange) 2013 is the ability to store contact photos in a users mailbox. From a Lync perspective this negates the size and resolution restrictions that are imposed by AD hosted photos. Any Exchange 2013 mailbox enabled user is able to upload their own Hi-Res photo via Outlook Web Access, or through the Lync 2013 client options menu. The recommended size of an Exchange hosted photo is 648×648 with a colour depth of 24bits – this will ensure that no matter what you get up to in Lync, your photo will always appear crisp and clear.

There is however a slight gotcha; When an image is uploaded to a users mailbox, a 45×45 thumbnail copy will also be placed in Active Directory over writing any existing photo. This matters, as any existing Lync 2010 or legacy clients will still reference AD for their contact photos. So although uploading Hi-Res photos to Exchange will improve the experience for all Lync 2013 users, the legacy user experience will actually deteriorate if you originally had 96×96 AD photos! If you plan on the continued use of legacy clients for particular users, you should re-import 96×96 AD photos for those users after you have imported their Hi-Res mailbox photo for optimal legacy photo experience.

The below images show the difference between a Lync 2010 and Lync 2013 client viewing the same user photo in a conference as a result of the above mentioned scenario.

Contacthires Contactlowres
Naturally, administrators have the power to import or modify photos for any given user via PowerShell. This is achieved through the ‘Set-UserPhoto’ cmdlet. The following combination of cmdlet’s will create a photo variable, upload that photo, and then assign it to the specified user;

$photo = ([Byte[]] $(Get-Content -Path “C:\Photos\BenDonaldson.jpg” -Encoding Byte -ReadCount 0))
Set-UserPhoto -Identity “Ben Donaldson” -PictureData $photo -Confirm:False
Set-UserPhoto -Identity “Ben Donaldson” -Save -Confirm:False

Once you’ve completed your import & assignment, you should be able to browse directly to that photo by URL providing that your Exchange Web Services are working correctly;

Lync Client Policy

Regardless of which implementation method you adopt for your contact photos, overriding control rests with the Lync Client Policy that is applied to your users. You need to ensure that the relevant settings in your Client Policy are configured correctly in line with your Photo requirements. There are two settings of note, -DisplayPhoto and –MaxPhotoSizeKB This often catches people out; for example if your left wondering why your nasty looking AD photos are still appearing for users instead of your glossy Hi-Res Exchange ones, it’s probably because your Client Policy is specifying AD photos only.

By default, the global Lync 2013 Client Policy will allow all photos. As an example of modifying the policy, if you wanted to restrict users to only using their AD photo;

Set-CsClientPolicy -Identity “Global” -DisplayPhoto PhotosFromAdOnly

If you wanted to prevent the use of contact photos entirely;

Set-CsClientPolicy -Identity “Global” -DisplayPhoto NoPhoto

The second setting of importance is the –MaxPhotoSizeKB attribute. This most commonly impacts environments who have chosen to use URL based photos. Exchange 2013 hosted images are not affected by this policy setting. Naturally this dictates the maximum size of a photo and has a default value of 30KB. The below command raises this to 100;

Set-CsClientPolicy -Identity “Global” -MaxPhotoSizeKB “100”

Finally, at the time of writing this article there is no policy based mechanism that enables you to ‘force’ a user to show their photo. Whether this is a decision that Microsoft have taken on moral or user privacy grounds is unclear. Regardless of how untidy or inconsistent an administrator might think this makes things appear, if a user doesn’t want people to see their photo, they can turn it off – and that’s that.


Posted in Lync 2013 and tagged . Bookmark the permalink. RSS feed for this post. Leave a trackback.

6 Responses to Contact Photos in Lync 2013, Because Image is Everything

  1. Ivailo Tzenkov says:

    Hi Ben,
    Actually, there is a way to force the users to show their photos. Here is what I’ve found recently –

    • Ben Donaldson says:

      Thanks Ivailo, I’d come across Iains work around previously as he is an active contributor to the Lync Technet forums, but neglected to reference it as I haven’t tested it in a fully populated production environment. Thanks for the link, which I’ll leave up for those who might wish to implement the solution.

  2. Samual Hassi says:

    Very informative !
    Earlier, I had tried Lepide Active Directory Bulk Image Editor to manage images of users account in my entire domain. It worked perfectly for me. User friendly and graphical interface makes the usage of this tool extremely simple and effective.
    I would highly recommend this excellent utility for those users who searches for a free tool to manage such image editor tasks for users and contacts in bulk.

  3. James White says:

    Nice article Ben! 🙂

  4. Steve Bennett says:

    Hi Ben, We’re using Skype for Business and Exchange 2013 with Outlook 2010. At first I uploaded all of our images as 96*96 pixels and all under 10KB. The quality was surprisingly good in Outlook but as expected, rather blurry in a Skype call window or Skype meeting. I then uploaded a handful of 648*648 images (still using Code Two). The quality was now excellent in Skype but significantly worse in Outlook 2010. Is this the same issue that you described with Lync 2010? Or is Outlook 2010 just doing a poor job of displaying the 648*648 image in a 96*96 sized place?

  5. Steve Bennett says:

    And, if the latter is true, is it possible to have Outlook and Skype configured to grab their images from different places? So that Outlook can refer to a 96*96 image and Skype a 648*648 image?

Leave a Reply

Your email address will not be published.

Copyright © 2014 · All Rights Reserved