LDAP jpegPhoto as arbitrary data in Lotus Script

We are currently trying to implement a picture service (in the widest sense) for integrated customers on our sametime server. Their company logos should be visible in chat windows.

Therefore we created a database where we administer the client credential information. We noticed, that - somehow - we are only able to integrate pictures in sametime via LDAP, and only then, when the jpeg photos were stored in the documents via an external LDAP administration tool.

Doing so results in a separate item in the document of data type “Arbitrary Data”. Unfortunately having to store the pictures with an external tool, rather than with Lotus Script before the save event is a tiresome process.

So, after my sermon my question is: Does anybode know if there is a way to integrate jpeg photos into Notes documents just as if you would have added them via an external LDAP tool? I figure there might not be built in functionality for that, however, are there any DLLs or anything else that would enable me to automate this process? Thanks in advance.