home projects speaker

how to put a gravatar on your blog

Note

Please note that this is an archived post, so links, code and the communicated message might be outdated. YMMV

Gravatar, what is it? Gravatar stands for Globally Recognized Avatars. A gravatar is an avatar that's linked with your email adress. This avatar can be used on all sites that support Gravatar. Gravatar is as simple as it's genious. Go register on gravatar.com to get your Gravatar today!

Once you registered, you can test your gravatar under this article by using the comments!

How do I get gravatars on my weblog?

Setting up gravatars on your weblog is easy, you don't even need an account! Plugins are available for leading weblog software, and our tutorials will have you running gravatars in no time. To request a gravatar from our servers, you simply add an image to your comments area with an "src" attribute that points to our gravatar image generator and includes an MD5 hash of the commenter's email address.

So, how is this actually done?

It's done like this (in PHP):

$default = "http://your.domain.com/imagefolder/default_gravatar.png"; $size = 50; $grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=".md5($email)."&default=".urlencode($default)."&size=".$size;


About the author

Hi! My name is Alexander, and I am a creative frontender, specializing in UX, accessibility, universal design, frontend-architecture, node and design systems. I am passionate with open source projects and love to dabble with new emerging technologies related to frontend. With over 24 years of frontend experience, I have earned the right to be called a veteran. I am a lover of life, technologist at heart. If I am not coding, I am cooking and I love whisky and cigars. Oh, and coffee, I LOVE coffee!

If you want to know more about me, here is some links you might want to check out: GitHub, Instagram, Twitter, LinkedIn, CodePen, Slides.com, npm,

Speaker

I am also an avid speaker on several topics! Check out some of the things I speak about, and contact me if you are interested in having me at your next event!