node package manager



Yet another node library for Gravatar with support for both the photo and profile APIs.

Build Status


Although all of the gravitate functions can accept an email, there is still a hash function available for your use. If the input has already been hashed then it will just return the value.

var gravitate = require('gravitate');
var email = '';
var hash = gravitate.hash(email); // "63b91ca4ec19ad79f320eaf5815d75e9" 

ignorePlus - Ignore characters after and including a + sign. Defaults to true.


var hash = '63b91ca4ec19ad79f320eaf5815d75e9';
var imageUrl = gravitate.image.url(hash); // "" 

All functions also accept an email:

var email = '';
var imageUrl = gravitate.image.url(email); // "" 

Image and profile urls are secure by default. You can toggle SSL by setting the secure property in options to true or false.

var email = '';
var imageUrl = gravitate.image.url(email, {secure: false}); // "" 

All of the standard url options are also available either through their full or abbreviated name:

var email = '';
var imageUrl = gravitate.image.url(email, {
  default: 'monsterid',
  r: 'pg'


Profile urls work the same way as image urls and also accept a secure parameter:

var email = '';
var profileUrl = gravitate.profile.url(email); // "" 

Often times you'll want the actual data and not url. You can get the profile data with the following function:

var email = '';
var profileUrl =, function (err, data) {
  if (err) return;
  console.log(data.entry[0]); // {hash: '...', photos: [], ...}