Get url to gravatar

def gravatar(self, size):
        """ Get url to gravatar """
        hash = md5(self.email.encode('utf-8')).hexdigest()
        url = 'http://www.gravatar.com/avatar/{}?d=mm&s={}'
        return url.format(hash, size)