Issue Completely Disabling Photos in Lync 2013

I had a customer request recently to be able to completely disable photos for some users in Lync 2013.  They didn't want photos to show up anywhere in the Lync 2013 client for these users.  It sounded like an easy enough request, however, it turned out not to be.  Photos in this environment would be coming from AD, stored in the thumbnailPhoto attribute.  When user's logged in, photos would display as expected:

In order to disable photos in the client, you will need to edit the client policy.  You can run:

Set-CsClientPolicy -Identity <policy> -DisplayPhoto NoPhoto

If you sign out and back in to the Lync client, you will notice that photos no longer display:

Simple enough, right?  Unfortunately, there's one small wrinkle.  If you view a user's contact card:

or open an IM window with a user:

You'll notice that their photo is displayed.  This is a different experience than the Lync 2010 client where photos are disabled in the contact card and IM window after setting the DisplayPhoto parameter to NoPhoto in the client policy:

There is another parameter in the client policy that can control photos, MaxPhotoSizeKB.  From the Set-CsClientPolicy TechNet article:

Indicates the maximum size (in kilobytes) for photos displayed in Lync. Setting the MaxPhotoSize to 0 prevents any photos from being displayed in Lync.

The default value is 30 kilobytes.

Unfortunately, you can't set this parameter to 0:

PS C:\Users\Administrator.TEST> Set-CsClientPolicy -Identity <policy> -MaxPhotoSizeKB 0
Set-CsClientPolicy : MaxPhotoSizeKB must be greater than or equal to 1.
At line:1 char:1
+ Set-CsClientPolicy -Identity Global -MaxPhotoSizeKB 0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Global:String) [Set-CsClientPolicy], PropertyArgumentOutOfRangeException
    + FullyQualifiedErrorId : InvalidUpdate,Microsoft.Rtc.Management.Internal.SetClientPolicyCmdlet

You can set the value to 1, which means that photos over 1KB in size shouldn't be displayed in the Lync 2013 client.  You can verify that the policy took effect by checking the in-band provisioning settings in the client .UccApilog file:

- <provisionGroupList  xmlns="">
       <provisionGroup  name="publicProviders"/>
    +  <provisionGroup  name="userSetting">
    +  <provisionGroup  name="ServerConfiguration">
    +  <provisionGroup  name="locationPolicy">
    +  <provisionGroup  name="persistentChatConfiguration">
    +  <provisionGroup  name="mediaConfiguration">
    +  <provisionGroup  name="meetingPolicy">
    +  <provisionGroup  name="privacyPublicationGrammar">
    +  <provisionGroup  name="presencePolicyV2">
    +  <provisionGroup  name="ucPolicy">
    +  <provisionGroup  name="publicationGrammar">
    -  <provisionGroup  name="endpointConfiguration">
        -  <propertyEntryList>
               <property  name="ShowRecentContacts">true</property>
               <property  name="ShowManagePrivacyRelationships">false</property>
               <property name="MaxPhotoSizeKB">1</property>
               <property  name="DisableMusicOnHold">true</property>
               <property  name="PhotoUsage">NoPhoto</property>
               <property  name="AbsUsage">WebSearchOnly</property>
               <property  name="HotdeskingTimeout">300</property>
               <property  name="EnableContactSync">true</property>
               <property  name="ShowSharepointPhotoEditLink">false</property>
               <property  name="EnableVOIPCallDefault">false</property>
               <property  name="MaximumDGsAllowedInContactList">10</property>
               <property  name="P2PAppSharingEncryption">0</property>
               <property  name="EnableHighPerformanceP2PAppSharing">false</property>
               <property  name="EnableHighPerformanceConferencingAppSharing">false</property>
               <property  name="TracingLevel">Light</property>
        - </propertyEntryList>
    - </provisionGroup>

Checking the size of the photo, you can see that it is larger than 1 KB:

You can also view the size of the photo using Fiddler:

Note: You may need to click on the image above in order to read the text.

Unfortunately the Lync 2013 client will still display photos in the contact card and IM window.  Currently there's no way to completely disable photos from showing in the Lync 2013 client.