Do the EXACT same thing as for gravatar but use http://paulisageek.com/openidavatar/avatar/ instead of http://www.gravatar.com/avatar/.
http://paulisageek.com/openidavatar/avatar/8e6afbade64e6c35ef4bc0c52f4b02f5
The avatar directory simply looks up to see if there is a matching OpenID, if so, change the md5 to the desired email's md5, and redirect to gravatar. If there is no match, it is a direct pass-thru.
If you have both openids and emails, you can use the email_md5 parameter to give a fallback incase the openid doesn't have an avatar.
For example, assume the poster's openid is http://paulisageek.com/, the md5 of which is 9884a6211d8e83a7770550708f5785cf. Assume they also have the email spam@paulisageek.com which has an md5 of b3bb70a4bace7f9bd49f48b149ab95f9. The url would then be :
http://paulisageek.com/openidavatar/avatar/9884a6211d8e83a7770550708f5785cf?email_md5=b3bb70a4bace7f9bd49f48b149ab95f9
Advanced: If you pass the whole openid instead of the md5, I will do the normal md5 check in the database first (by md5ing the url). If there isn't a registered image, I will fetch the page and look for an hcard photo microformat. The CSS selector is [class=vcard] [class=photo]. If a hcard photo is present, that image will be served. For example:
http://paulisageek.com/openidavatar/avatar/http://tantek.com