I was looking to show gravatar (photos) on the author’s post on a WordPress website. I looked around, but most WP plugins are designed to show gravatar on the comments, not on the actual post.
There are hacks around for this, but they seemed too complicated for this simple task.
One had the promise, but strangely ended up not working.
In the end, I’ve had enough, and delved into WP’s source code. Lo and behold, it’s actually pretty easy. Just insert this in main template’s code, and voila — author’s photo.
<img src="http://www.gravatar.com/avatar.php?gravatar_id=<?php global $authordata; echo md5($authordata->user_email); ?>" />
Hope it helps someone.
(credit to tyr for the idea)