I've gotten sufficiently annoyed with a trivial problem that I'm preparing to write an IETF RFC. Yeah. That's how ticked off I am!
Every site that I sign up for asks me to upload an avatar to represent myself. Whenever I change my photo, I have to log in to a hundred sites and change it there0.
Perhaps they could all use Gravatar - but that's a centralised service1 and doesn't work with wildcard email addresses. Libravatar also relies on email addresses and requires implementers to set up new DNS entries.
So I'm proposing .well-known/avatar. Here's how it works (for now). I'd like your feedback before going further2.
I sign up to a service and use the email address whatever@shkspr.mobi.
The service looks up my avatar using a well-known path. For example, request https://shkspr.mobi/.well-known/avatar?resource=acct:whatever@shkspr.mobi and you'll get back this JSON:
JSON
{ "subject": "acct:whatever@shkspr.mobi", "links": [ { "rel": "http:\/\/webfinger.net\/rel\/avatar", "type": "image\/webp", "href": "https:\/\/shkspr.mobi\/.well-known\/avatar\/avatar-1024.webp", "sizes": "1024x1024" }, { "rel": "http:\/\/webfinger.net\/rel\/avatar", "type": "image\/jpeg", "href": "https:\/\/shkspr.mobi\/.well-known\/avatar\/avatar-512.jpg", "sizes": "512x512" } ] }
That's a slightly enhanced https://webfinger.net/rel/#avatar which adds a sizes parameter. The service can then pick the appropriate MIME and size.
Alternatively, you can request the same URl but with a header of Accept: image/gif and receive the default sized avatar in that specific format.
Try it by running:
Bash
curl -H "Accept: image/avif" https://shkspr.mobi/.well-known/avatar/ --output "test.avif"
You should receive an auto-converted version of my avatar.
Some Thoughts
Please add your thoughts to the comments box. Here's some feedback I've received so far.
Perhaps this is too complicated? What's wrong with just serving up an image when the URl is requested? That would make it easier for static sites.
What about a size parameter?
Will anyone actually use it?
What about hashing the email?
You've already given the service your email address, and your domain already knows your account name - so there's no privacy leak here. Obviously, a service shouldn't hotlink to your avatar image.
How about DNS?
I like it. Is there an argument that service / endpoint should be specifiable at the DNS level?As others in your comments pointed out, if your site is currently just static, some users might prefer to run an entirely separate dedicated avatar service.
— Emily Shepherd (@emi.ly) 2025-10-25T11:57:43.456Z
Personally, I think that's a bit complicated, but I'm happy to be convinced.
No! For example, if you know my GitHub username then you should be able to get the avatar from https://github.com/.well-known/avatar?resource=acct:edent
Perhaps a hash, timestamp, or something else?
I'm not sure how / if WebFinger handles this. I suppose there ought to be some limit to avoid overwhelming a server.
Proposal
I think the default should be to return an image.
If an accept of image/… is requested, the server should try to return an image in that format.
If an accept of application/json or similar is requested, the server should return a JSON document listing the available avatars.
I don't think a ?size= GET parameter is necessary; services can resize once they've downloaded, or use the JSON document to get the right size.
A limited amount of alt text could be added using the title attribute in the JSON.
Before I start writing up anything formal - I'd love your constructive criticism on this.
12 thoughts on “Alpha launch - .well-known/avatar - feedback wanted”
Lee
I've no problem with webfinger type resources, but I would point out that assuming responses vary based on "Accept:" headers makes it less efficient to use with a proxying cache server.
Proxying CDNs (such as CloudFront) don't apply the logic directly (they can't without being provided specific additional configuration) so just treat the header (which from browsers is usually a list of types rather than a specific type) as a key. Which means supporting "Accept:" headers means requesting the same backend resource for every different change in that header.
So a "MAY" rather than a "SHOULD".
@Edent This feels like it's conflating two problems: Distributed identity, and publication of a point of contact for an avatar service. I'd suggest focusing on content of the avatar service and stick to a user-supplied URI for a locator.
A directory service to find the avatars is really a directory service for finding identity records.
| Reply to original comment on a2mi.social
@Edent Big fan of the decentralization goal! Also curious about what can be learned from Gravatar (what to do, or what not to do). Since quite a few sites do use them, I wonder if having some compatibility with their "API" could be beneficial, to reduce implementation friction. (Edit: also curious about what drove their choice to use hashes)
I also wonder about how the standard would handle "wild success" - if Gmail or Yahoo wanted to implement it, how would that shift the requirements (including non-functional requirements like security)?
Great idea, good for you for tackling the general case!
| Reply to original comment on infosec.exchange
A scratch proposal for creating .well-known/avatars
| Reply to original comment on well-known-avatars.alanwsmith.com
Terence Eden wrote a blog about a proposal for, essentially, “You want my avatar? Fine, you have my email address, go get it yourself.” Which,…
| Reply to original comment on mechadarwin.com
@Edent I like this *a lot*
| Reply to original comment on mastodon.me.uk
@Edent Would it be better to use the path rather than the query string, maybe (so .well-known/avatar/cjwatson@debian.org rather than .well-known/avatar?resource=acct:cjwatson@debian.org)? Seems like it'd be a bit easier for static hosting folks to deal with, and it should be no harder for people who can deploy a web service.
| Reply to original comment on mastodon.ie
Re: How can a service tell if the avatar has been updated?
I think this is already solved by cache headers.
Alpha launch - .well-known/avatar - feedback wanted via @jak2k https://lobste.rs/s/obwzso #web
https://shkspr.mobi/blog/2025/10/alpha-launch-well-known-avatar-feedback-wanted/
webAlpha launch - .well-known/avatar - feedback wanted
| Reply to original comment on mastodon.social
As a static site author, I would want to implement this by just putting some files in a
.well-knownfolder on my server. But the behaviour regardingAcceptheaders would prevent this AFAICS.Why are forward-slashes in the URLs quoted?
Because that's what the JSON specification says - see section 9.
Also documented at https://www.json.org/img/string.png
More comments on Mastodon.