vCard avatar using LDAP

Not the end of the world, but…

I have everything up and running fine, vCards are working brilliantly and avatars are also working, but not for everyone.

Take a one sample user:

The user does have the jpegPhoto attribute populated.

I was able to independently extract the binary information to a file and open it up, verifing that it is a valid jpeg.

I have compared this users jpeg to other users jpegs and they all seem, more or less, the same.

Any ideas?

Is there somewhere I can look for more information?

Thanks

Bob

Hi Bob,

did you try the thumbnailPhoto Attribute in Active Directory for the avatars? It works for me very well and better then the jpegPhoto Attribute because it is also used for our exchange server / outlook.

You will find the details for this attribute here: http://msdn.microsoft.com/en-us/library/ms680034.aspx

Another possibility: Have you checked the size (pixels and kB) of the pictures? Is there a difference between working and not working pictures?

Another idea: Your LDAP Connection is to the global catalog (Port 3268) or directly to a domain controller (389)?

Best,

Benni

We kind of had a similar problem.

All users had pictures in Outlook, but some had pictures in Spark, others not. We found out it depended on what application was used to put the pictures in Active Directory (AD). Some applications fill the thumbnailPhoto/jpegPoto with a base64 encoded value, other let AD do the encoding itself.

If you use ldapsearch on Linux e.g. you can see the difference by the AD attribute either having one or two colons after the attribute name. Two colons is correct and also works with Spark. One colon is not correct, but some applications like Outlook can automatically work around it.

Cheers Steff

Sorry for the delay but I needed to test the answer to verify it was correct.

The problem was that even though I was using the photos from our phoenbook which are already cropped to 120x150 px some of those files were much larger than 8Kb. I also found that the XEP-0153 also recommends files less than 8Kb and a size of no more than 64x64px.

I reduced the size of my pictures by using the ImageMagick command:

convert -size 64x64 oldFile.jpg -resize 64x64 +profile ‘*’ newFile.jpg

By reducing the file I found that it fixed nearly all of the problem photos. I still have a couple files which are bigger than 8Kb even when reduced to 64x64, but tht is just a problem of the source photo which I can fix later.

Thanks

Bob

Great to hear!

To convert the pics to lower filesize, the command “-resize 50%” in ImageMagick can help you. Maybe you can test different values for the quality of the pictures. 70-80% are good reduce factors for less quality loss.

Thanks for sharing your test results in detail.

Best Regards,

Benni