title: Check if gravatar exist with node.js
body: <p>Hello right know I have a small web application using Sails.JS and I'm trying to set a default image if the user doesn't have a gravatar account/profile.</p>
  
  <p>This is the code that I use to hash the email in my controller:</p>
  
  <pre><code>var crypto = require('crypto');
  req.session.email = 'user_email@gmail.com';
  req.session.gravatar_hash = crypto.createHash('md5').update(req.session.email).digest('hex');
  </code></pre>
  
  <p>As you see I have in session the hash  now.</p>
  
  <p>So in my view I have:</p>
  
  <pre><code>&lt;div class="gravatar" style="background-image: url('http://www.gravatar.com/avatar/&lt;%=req.session.gravatar_hash%&gt;?s=50');"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>This code works great for showing the gravatar (default or custom) image, but what If i want to do a validation so if the user doesn't have a gravatar I can use a custom image??
  There is a way to validate that? </p>