# Custom Local Avatars

**URL:** https://meta.discourse.org/t/custom-local-avatars/9463
**Category:** Blog
**Created:** [2013年八月29日 18:48 UTC](https://meta.discourse.org/t/custom-local-avatars/9463 "2013-08-29T18:48:52Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2013年八月29日 18:48 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/1 "2013-08-29T18:48:52Z")

</div>

One of the most requested features in the last few months is easily custom avatars. Although Discourse has always supported standard Internet-wide Gravatars based on the account email address, there were some long-standing concerns: Some people simply don’t like Gravatar, for whatever reason, though as a WordPress company they are (at least in my opinion)

* * *

This topic is for comments on the original blog entry at: [Custom Local Avatars](http://blog.discourse.org/2013/08/custom-local-avatars/)

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [2013年八月30日 08:53 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/2 "2013-08-30T08:53:24Z")

</div>

> [@codinghorror](#):
>
> Animated GIF avatars are (thankfully) disabled by default

**This is an outrage!**

 ![](https://global.discourse-cdn.com/meta/original/2X/7/72524712a72a3b6db6075a3ad7113b189fe89490.gif)

(on second thought, I see your point…)

---

<div class="post-metadata">

### Author: ![evaryont](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/evaryont/32/122402_2.png) [@evaryont](https://meta.discourse.org/u/evaryont)
#### Post date: [2013年八月31日 04:54 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/3 "2013-08-31T04:54:19Z")

</div>

Have you thought about adding support for one of the new(ish) distributed avatar protocols? Such as [Libravatar](https://www.libravatar.org/) or [Pavatar](http://pavatar.com/)?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2013年八月31日 05:54 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/4 "2013-08-31T05:54:32Z")

</div>

Thanks for bringing those to my attention.

Pavatar looks pretty dead. The page has a date of 2006 for the “latest spec”, and the latest post on their [support forum](http://pavatar.com/forum/forum.php) is from 2008! And I’ve never heard of it until now. This does not bode well.

As for Libravatar, it says:

> How is Libravatar different from Gravatar though? The main difference is that while [Libravatar.org](http://Libravatar.org) is an online avatar hosting service just like Gravatar, the software that powers the former is also available for download under a free software license.
> 
> Why would you want to run your own instance? Our belief is that centralised approaches don’t put users in control. If you own your own domain name, you control how mail is delivered to your domain. You should also be able to control how avatars are served to other websites.
> 
> For example, if you own a business, you may want to integrate with existing systems (e.g. a staff directory) and delegate authentication to what you’re already using (LDAP?). Plus, you can choose what happens when email addresses are not found (display your company logo?).

So this is an additional layer of complexity. Rather than Discourse being the single point of truth for avatars, there’s another service you install alongside it which is..

I dunno, I think merely serving avatars is not that useful of a service to run, the difficulty of spinning it up is not worth what it provides to you versus Gravatar.

---

<div class="post-metadata">

### Author: ![nadir\_seen\_fire](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nadir_seen_fire/32/104741_2.png) [@nadir\_seen\_fire](https://meta.discourse.org/u/nadir_seen_fire)
#### Post date: [2013年九月1日 06:25 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/5 "2013-09-01T06:25:29Z")

</div>

Speaking of pavatar. Here’s the reason it was rejected from [microformats.org](http://microformats.org)’s registry of rel values.  
[[uf-discuss] rel="pavatar"](http://microformats.org/discuss/mail/microformats-discuss/2006-December/007919.html)

I don’t completely agree with the rationale for rejection (hCard makes me want to vomit) but it does make you think that some other standards out there could be used to support turning personal urls into avatar sources besides depending on Gravatar.

---

<div class="post-metadata">

### Author: ![lightweight](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lightweight/32/116381_2.png) [@lightweight](https://meta.discourse.org/u/lightweight)
#### Post date: [2015年七月14日 01:56 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/6 "2015-07-14T01:56:20Z")

</div>

While you can, of course, host your own “libravatar” instance, you can also make use of the exemplar of Libravatar, [https://libravatar.org](https://libravatar.org), exactly as you would Gravatar. No need to host your own. That Libravatar service is just like Gravatar, except with more freedom attached…

In theory, you should be able to swap the [libravatar.org](http://libravatar.org) URL for the [gravatar.com](http://gravatar.com) URL in Discourse’s configuration. I’m new to Discourse, so I haven’t seen if it’s an admin-editable URL, or if it has to be done in the filesystem (I suspect the latter) - it’d be very cool if this was abstracted into the admin settings (along with switches for the explanatory links that currently lead users to [Gravatar.com](http://Gravatar.com)) interface. I’d prefer to use Libravatar over Gravatar.

By the way, if you create a Libravatar account, it will help you import your existing [Gravatar.com](http://Gravatar.com) email addresses and associated images, so it’s an easy transition.

---

<div class="post-metadata">

### Author: ![lightweight](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lightweight/32/116381_2.png) [@lightweight](https://meta.discourse.org/u/lightweight)
#### Post date: [2015年七月14日 02:00 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/7 "2015-07-14T02:00:33Z")

</div>

I should point out that the Mozilla developer who had a lot to do with Mozilla Persona, Francois Marier, is also the main developer behind Libravatar… so, given that association, it seems fitting to at least allow the option of Libravatar in Discourse 😄

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年七月14日 02:07 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/8 "2015-07-14T02:07:55Z")

</div>

Keep in mind, our implementation of gravatar is very secure and private. Unlike the vast amount of implementations in the wild.

We cache all images on the server, users have to opt-in to update avatar from gravatar.

This means gravatar is not getting any information about browsing habits and other nasty analytics every 5 minutes.

---

<div class="post-metadata">

### Author: ![lightweight](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lightweight/32/116381_2.png) [@lightweight](https://meta.discourse.org/u/lightweight)
#### Post date: [2015年七月14日 02:23 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/9 "2015-07-14T02:23:40Z")

</div>

Given that Libravatar is both FOSS and a drop-in (API compatible) replacement for Gravatar, it seems like it offers some philosophical advantages and wouldn’t add substantially to the complexity of the codebase to allow implementations of Discourse to decide which service they prefer. I understand it might not be a priority for you guys at the moment - would you be open to a pull request if I can implement the support?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年七月14日 02:28 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/10 "2015-07-14T02:28:52Z")

</div>

I am open to making core more extensible and then you can use a plugin for libravatar support. A PR for the extensibility points is the best approach here.

---

<div class="post-metadata">

### Author: ![lightweight](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lightweight/32/116381_2.png) [@lightweight](https://meta.discourse.org/u/lightweight)
#### Post date: [2015年七月14日 02:38 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/11 "2015-07-14T02:38:09Z")

</div>

Fair enough. Will look into how to do that. Thanks.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2016年四月18日 21:02 UTC](https://meta.discourse.org/t/custom-local-avatars/9463/12 "2016-04-18T21:02:03Z")

</div>


