Active Directory Thumbnail Images

Part of the new functionality in Exchange is the capability of adding a (very small) thumbnail image. A side benefit of this is that it will show up as the “Default Corporate Image” for Lync, which was the impetus of why I was looking at this in the first place!

Enter an old program I used to use a lot: ImageMagick (

The trick with these thumbnail images is that the recommended size is 96×96 pixels. But if you just take any photograph and resize it to 96×96, it will most likely be above the size limit you can upload, which is a paltry 10 kb.

Here’s an easy one that will convert most images to below that, and still retain more than enough quality:

convert source-image.jpg -resize 96x96 -quality 85 -strip target-image.jpg

  converts to

Deceptively simple, but very efficient. It changes the quality of the image but not enough that it is really visible. -strip simply removes all the extras which get added (EXIF information, for instance).

After that, pull up your EMS and do:

Import-RecipientDataProperty -identity target-account -Picture -FileData ([Byte[]] $(Get-Content -Path target-image.jpg -Encoding Byte -ReadCount 0))

Congratulations – you’ve just updated your Active Directory thumbnailPhoto attribute!

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply