mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
Allow overriding the default avatar image
(imported from commit 66d413682a822e0019f28033f19908bdd9fa0156)
This commit is contained in:
@@ -40,4 +40,4 @@ def get_avatar_url(avatar_source, email):
|
|||||||
hash_key = gravatar_hash(email)
|
hash_key = gravatar_hash(email)
|
||||||
return "https://secure.gravatar.com/avatar/%s?d=identicon" % (hash_key,)
|
return "https://secure.gravatar.com/avatar/%s?d=identicon" % (hash_key,)
|
||||||
else:
|
else:
|
||||||
return '/static/images/default-avatar.png?x=x'
|
return settings.DEFAULT_AVATAR_URI+'?x=x'
|
||||||
|
|||||||
@@ -85,6 +85,11 @@ NAME_CHANGES_DISABLED = False
|
|||||||
# from gravatar.com.
|
# from gravatar.com.
|
||||||
ENABLE_GRAVATAR = True
|
ENABLE_GRAVATAR = True
|
||||||
|
|
||||||
|
# To override the default avatar image if ENABLE_GRAVATAR is False, place your
|
||||||
|
# custom default avatar image at /home/zulip/local-static/default-avatar.png
|
||||||
|
# and uncomment the following line.
|
||||||
|
#DEFAULT_AVATAR_URI = '/local-static/default-avatar.png'
|
||||||
|
|
||||||
### TWITTER INTEGRATION
|
### TWITTER INTEGRATION
|
||||||
|
|
||||||
# Zulip supports showing inline Tweet previews when a tweet is linked
|
# Zulip supports showing inline Tweet previews when a tweet is linked
|
||||||
|
|||||||
@@ -266,6 +266,7 @@ DEFAULT_SETTINGS = {'TWITTER_CONSUMER_KEY': '',
|
|||||||
'CAMO_URI': None,
|
'CAMO_URI': None,
|
||||||
'ENABLE_FEEDBACK': True,
|
'ENABLE_FEEDBACK': True,
|
||||||
'ENABLE_GRAVATAR': True,
|
'ENABLE_GRAVATAR': True,
|
||||||
|
'DEFAULT_AVATAR_URI': '/static/images/default-avatar.png',
|
||||||
}
|
}
|
||||||
|
|
||||||
for setting_name, setting_val in DEFAULT_SETTINGS.iteritems():
|
for setting_name, setting_val in DEFAULT_SETTINGS.iteritems():
|
||||||
|
|||||||
Reference in New Issue
Block a user