Gravatar is getting really popular, may sites like stackoverflow or github have incorporated the avatars. It would be nice to have a consistent avatar throughout all forums and sites.
mrnutty
761
Senior Poster
Recommended Answers
Jump to PostAs an avid avatar junkie, why would you want to have the same avatar on different forums? ;)
Just kidding, it's a nice idea. I'd actually never heard of Gravatar though, so I'd have to look into it. There's also the niggling worry about using plugins to off-site storage that …
Jump to PostGravatar is pretty old (pre-dating Fb). If you open their url with your email md5'ed then you get the image belonging to that address.
Jump to PostYup, it's pretty simple:
<?php function gravatar($email,$size = 75) { $avatar = md5(strtolower(trim($email))); return '<img class="avatar" src="http://www.gravatar.com/avatar/' .$avatar.'.jpg?d=identicon&s='.$size.'" alt="avatar" />'; } echo gravatar('random@mail.tld'); ?>
It returns an image even if there's no registration there.
Jump to PostYup, it's pretty simple:
I didn't suggest otherwise. It's a smidge more complicated because we'd still want to support local avatars, but I'd almost call such a feature trivial to implement...almost. ;)
My concern had more to do with whether supporting Gravatar would be both sufficiently beneficial as …
All 13 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
cereal
1,524
Nearly a Senior Poster
Featured Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
cereal
commented:
agree :)
+0
diafol
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
<M/>
170
Why so serious?
Featured Poster
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
LastMitch
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
LastMitch
mrnutty
761
Senior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.