Quantcast
Channel: March 2024 – Terence Eden’s Blog
Viewing all articles
Browse latest Browse all 20

.well-known/avatar

$
0
0

Hot on the heels of a post I wrote 4 years ago, wouldn't it be useful to have a well-known URl for user avatar images?

When I sign up to a web service, I don't want to faff around uploading an image to use as my avatar. I want that service to look at my email address or social-sign-in and automatically pick up my preferred graphic.

Here's how I see it working.

  1. A user signs in to a service with the email address username@example.com
  2. In a similar way to WebFinger, the service makes a request to:
    • example.com/.well-known/avatar?resource=acct:username@example.com
  3. If the request's Accept header has a MIME type of image/*, then the server immediately returns an image.
  4. If the request's Accept header has a MIME type of application/json, then the server can return a WebFinger-style document with "rel":"http://webfinger.net/rel/avatar" and, perhaps, a list of different images, formats, and sizes.

This makes it incredibly simple for people to use the same avatar everywhere.

It also means that if you're designing a service which publicly shows usernames, you can make avatars available without an expensive API call. For example, Twitter could make user's avatars available at:
twitter.com/.well-known/avatars?resource=acct:edent

But what about...?

This is a sketch of an idea. I'd like to know if people think it is useful before I take it any further.

I don't think it breaches privacy - a user's image is public on all services anyway.

Users should still be given the option of changing their avatar if they want.

A service shouldn't expose the user's email address - they should proxy the image.

Anything else I should have thought of?

Updates

To stave off some common points raised.

  • No this isn't like Gravatar. That works by being a 3rd party service and using the MD5 of your email address.
  • No this isn't like Libravatar. See above.
  • No this isn't like WebFinger. That only returns JSON.
  • No this isn't like h-card. That requires a server to parse HTML in order to find an image.
  • No this isn't like BIMI. That's expensive and only supports SVG.

Viewing all articles
Browse latest Browse all 20

Trending Articles