timothyarmes/meteor-avatar — pull request #1 by timothyarmes (2014-12-18 16:39:42+00:00)
Title: Custom avatar property

This pull request allows us to specify a property ('customAvatarProperty') on the user object that may contain a URL (or data URI) for a custom Avatar to be used on a per-user basis.

This allows us to use a third-party package of our choice to allow users to upload custom avatars and store them on the user object, while still providing a standard Gravatar fallback for other users.

I've also allowed users to choose property paths for the 'emailHashProperty' and 'customAvatarProperty' options, so that they may be set to, for example, 'profile.avatar'. Previous we were restricted to properties at the top level of the object.

P.S. I personally recommend the excellent 'cropit' package (http://scottcheng.github.io/cropit/) to provide a way for the user to upload and crop images. It was very easy to integrate into my project, it's very easy to style, and of course once you've store the returned data URI into the database these modifications will pick out the user's custom avatar :)