@staticmethod<EOL><INDENT>def gravatar(hash, size=<NUM_LIT:100>, rating='<STR_LIT:g>', default='<STR_LIT>', include_extension=False, force_default=False):<DEDENT>
if include_extension:<EOL><INDENT>hash += '<STR_LIT>'<EOL><DEDENT>default = default or current_app.config['<STR_LIT>']<EOL>query_string = urlencode({'<STR_LIT:s>': int(size), '<STR_LIT:r>': rating, '<STR_LIT:d>': default})<EOL>if force_default:<EOL><INDENT>query_string += '<STR_LIT>'<EOL><DEDENT>return '<STR_LIT>' + hash + '<STR_LIT:?>' + query_string<EOL>
Pass email hash, return Gravatar URL. You can get email hash like this::

            import hashlib
            avatar_hash = hashlib.md5(email.lower().encode('utf-8')).hexdigest()

        Visit https://en.gravatar.com/site/implement/images/ for more information.

        :param hash: The email hash used to generate avatar URL.
        :param size: The size of the avatar, default to 100 pixel.
        :param rating: The rating of the avatar, default to ``g``
        :param default: The type of default avatar, default to ``identicon``.
        :param include_extension: Append a '.jpg' extension at the end of URL, default to ``False``.
        :param force_default: Force to use default avatar, default to ``False``.