Hi all, So after procrastinating for about a year thinking that I was the only person who cared about user photos I was surprised to learn that this is also important to our director.
Given the nature of the thing I've attacked it as mostly a client-side problem, since it involves cropping, and that requires client-side scripting. For that I've used an Open-Source project on Git Hub called cropper by Oscar Key. I made a tiny change, forcing the mime type to image/jpeg, which is what we'll eventually be storing the images as both in OIM and in AD.
Since we're running a single node in production (we don't think high-availability is important for IdM, since it's an internal business-hours app), I can get away with storing the relatively high-resolution images on the file system. The thumbnails are going into a pair of UDFs called UserPhoto1 and UserPhoto2 as base64. I just split the base64 string at 4000 chars if it's that long.
Right now I'm working on a task adaptor to push photo changes to AD.
I'm also going have an dbat connector to our badge system to provide a starter photo. The badge photos are usually unflattering enough that we expect them to provide incentive for the users to upload good photos, so that's the real motivation. This is simple and stupid: basically the connector runs in trusted mode, and during the reconciliation I'm planning to grab the base64 data and write it out to a jpg on the filesystem, as above.
Anyhow, so far I have the client Javascript, the sandboxes, and the backing bean. I'm happy to share, and will, but the backing bean is in an atrocious state so far, with paths etc. hard-coded.
I also have my own "listener" loop in the Javascript, because I couldn't find a good element/event to attach the client listeners to in the "My Information" taskflow.
Anyhow, code to follow.
-mark