User Profile Service is importing photos from AD. Sync and profile photos are being created fine. I've identified one profile picture that will not display in IE8, eventhough the picture exists. When viewing the user's profile with Chrome (and suspect other browsers), it will display fine. The picture also does not display in the org browser on any browser.
I did some research and found that there is a known thing in IE that will not display pictures that were saved with CMYK encoding (http://www.plaveb.com/blog/cmyk-images-not-displayed-in-internet-explorer and http://blog.rodneyrehm.de/archives/4-CMYK-Images-And-Browsers-And-ImageMagick.html).
I've tried to determine if the file is CMYK encoded, using the following PowerShell (sourced from here: https://stackoverflow.com/questions/446834/how-to-detect-if-a-jpeg-contains-cmyk-color-profile):
cls
Add-PSSnapIn "Microsoft.SharePoint.PowerShell" -EA 0
$web = get-spweb "http://mysite.myco.com"
$profilePhotos = $web.Lists["User Photos"]
$folder = $profilePhotos.RootFolder.SubFolders["Profile Pictures"]
$files = $folder.Files | sort "Name"
foreach($file in $files)
{
if (($file.Name -like "*problemphoto*")
{
$stream = $file.OpenBinaryStream()
$image = New-Object -TypeName System.Drawing.Bitmap -ArgumentList $stream
$flagValues = ([enum]::parse([type]"System.Drawing.Imaging.ImageFlags",$image.Flags))
$flagValues
}
}
The results of the flags did not indicate a CMYK scenario. In fact, it seems to indicate RGB.
ColorSpaceRgb, HasRealDpi, HasRealPixelSize, ReadOnly
I compared this with a known good profile pic and the results matched.
Also, I copied the picture down locally, opened it in Paint, and resaved the file. I then manually uploaded the file to the profile photo library in the my site host and the picture worked in IE.
Anyone seen issues like this with profile pictures? Is there anything other than the CMYK thing that could cause this issue?