Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A Ruby on Rails plugin that supplies view helpers for displaying globally-recognized avatars (gravatars) more easily.
Latest commit 5f6b0b0 @woods Merge pull request #3 from dschweisguth/returning-to-tap
Fix Kernel.returning deprecation on Rails 2.3.9+.


Gravatar Plugin

This plugin provides a handful of view helpers for displaying gravatars (globally-recognized avatars).

Gravatars allow users to configure an avatar to go with their email address at a central location: Gravatar-aware websites (such as yours) can then look up and display each user's preferred avatar, without having to handle avatar management. The user gets the benefit of not having to set up an avatar for each site that they post on.


cd ~/myapp
ruby script/plugin install git://

or, if you're using piston (worth it!):

cd ~/myapp/vendor/plugins
piston import git://


If you represent your users with a model that has an email method (typical for most rails authentication setups), then you can simply use this method in your views:

<%= gravatar_for @user %>

This will be replaced with the full HTML img tag necessary for displaying that user's gravatar.

Other helpers are documented under GravatarHelper::PublicMethods.


Thanks to Magnus Bergmark (, who contributed the SSL support in this plugin, as well as a few minor fixes.

The following people have also written gravatar-related Ruby libraries:

  • Seth Rasmussen created the gravatar gem

  • Matt McCray has also created a gravatar plugin


Scott A. Woods
West Arete Computing, Inc.
scott at westarete dot com


  • Add specs for ssl support

  • Finish rdoc documentation

Something went wrong with that request. Please try again.