Avataree (A ruby gem for Gravatar services)18 Dec 2010
Avataree is a gem to make your project/app deal with Gravatar services for profile and images in a simplified ruby manner.
first you need to create a dependency in your Gemfile
then let your bundle handle everything.
and avataree will be at your service.
In your controller for fetching gravatar image
for fetching gravatar profile
In addition to that avataree provides all options available/provided by Gravatar services.
Here are the details
:size, default 80px X 80px example:
If there is no image fount associated with email provided then Gravatar returns default image. A 90 degree tilted G. But you can customize it further with providing values for options :d or :default example:
values accepted by gravatar are:
404: returns an HTTP 404 (File Not Found) response
mm: (mystery-man) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash)
identicon: returns a geometric pattern based on an email hash
monsterid: returns a generated
monster with different colors, faces, etc
wavatar: returns generated faces with differing features and backgrounds
retro: returns generated, 8-bit arcade-style pixelated faces
Instead of that you can have your own default image by providing it’s URL (Note: url should be encoded to be carried away smoothly).
In addition to that you can always force gravatar to return default image by providing :f or :force default option.
Credits Credit for this gem goes to Gravatar team for making such a awesome application.