Is there a method to what pattern is displayed when no profile picture is set? I noticed different patterns for different people.
-
Are you talking about the gravatars? – Ladybug Killer Aug 15 '10 at 12:12
-
Yes, I was. :-) – 101 Aug 15 '10 at 19:34
This is generated by gravatar automatically in the absence of an image, whatever method they use is on that side (as opposed to SO doing it). It works by taking your email (the one you provided to the SO/SE site) and making an md5 hash of it, it then just turns that into a URL, like this:
http://www.gravatar.com/avatar/17878cd922587630c7a75ca2e0e0b177?d=identicon
With that d=identicon
is on there (or default=identicon
) you get a random semi-unique generated image, like this:
If it's not on there, you get the generic gravatar icon:
The only description they give for this is:
- identicon: a geometric pattern based on an email hash
So the method is ultimately your email address being translated into an image based on the hash of it...how exactly they do this it doesn't say.
-
-
1also, if they don't provide an email, it's a hash of their last known IP address – Jeff Atwood Aug 15 '10 at 21:40
-
3
-
You can actually change which pattern is displayed by changing the hash in the URL and change the size by varying the number after the s=
part.
Try fiddling around with different numbers in the hash to see the different colors and patterns that are generated for your liking.
For example:
http://www.gravatar.com/avatar/74ed89d655616683e90d16569b171a01.jpg?d=identicon&r=r&s=83
change it to
http://www.gravatar.com/avatar/74ed89d655616683e90d16569b171337.jpg?d=identicon&r=r&s=9001