Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arnaudligny/shavatar
Self-Hosted Avatar proposal + server implementation.
https://github.com/arnaudligny/shavatar
avatar gravatar proposal
Last synced: 2 days ago
JSON representation
Self-Hosted Avatar proposal + server implementation.
- Host: GitHub
- URL: https://github.com/arnaudligny/shavatar
- Owner: ArnaudLigny
- License: mit
- Created: 2015-04-19T23:01:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-02-02T09:56:23.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T18:32:23.189Z (6 months ago)
- Topics: avatar, gravatar, proposal
- Language: PHP
- Homepage: http://ligny.org/avatar/9ea5082df57281310fa93db64c70f88b
- Size: 53.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SHAvatar
SHAvatar is a **S**elf-**H**osted **Avatar** proposal.
The idea is everyone should be able to host himself his avatar image, provided to use its own domain name.
## Specifications
The domain name of an email address can be use as an entry point to display the avatar matching email.
Image request follow [Gravatar's rules](https://en.gravatar.com/site/implement/images/) (except for the domain name obsiouly).
### Example
If the e-mail address is `[email protected]` the image request will be `https://domain.tld/avatar/aa745c786b697726fbbc0a3679d8de8e`.
## PHP server implementation
### Requirements
Please see the [composer.json](composer.json) file.
### Install
1. Copy the `avatar` directory in the web-root of the virtual host your HTTP server
2. Add those requirements in your `composer.json`:
```javascript
"silex/silex": "^2.0",
"intervention/image": "^2.5"
```
And run `composer update`.### Usage
#### Add avatar image
1. The image file must be named `{HASH}-80x80.jpg` (where _{HASH}_ is a [MD5](https://wikipedia.org/wiki/MD5) hash of your email)
2. Put the file in `avatar/images` directory#### Test locally
1. Start local Web server: `php -S localhost:8000`
2. Request `http://localhost:8000/avatar/{HASH}` in your web browser### Demo
arnaud(at)ligny(dot)org :arrow_right: http://ligny.org/avatar/9ea5082df57281310fa93db64c70f88b
## License
_SHAvatar_ is a free software distributed under the terms of the [MIT license](https://opensource.org/licenses/MIT).
Copyright (c) Arnaud Ligny