Commit 7682cd7a authored by Michal Čihař's avatar Michal Čihař

Pass all params to libravatar

parent 3032b840
......@@ -55,10 +55,16 @@ def avatar_for_email(email, size=80):
Generates url for avatar.
'''
# Use libravatar library if available
if HAS_LIBRAVATAR:
return escape(libravatar.libravatar_url(email=email, https=True))
# Use libravatar library if available
url = libravatar.libravatar_url(
email=email,
https=True,
default=AVATAR_DEFAULT_IMAGE,
size=size
)
else:
# Fallback to standard method
mail_hash = hashlib.md5(email.lower()).hexdigest()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment