https://github.com/jorgenevens/avatar-redirect
Redirect to social network profile images
https://github.com/jorgenevens/avatar-redirect
avatar avatars profile-image profile-picture social-media social-network
Last synced: 5 months ago
JSON representation
Redirect to social network profile images
- Host: GitHub
- URL: https://github.com/jorgenevens/avatar-redirect
- Owner: JorgenEvens
- License: mit
- Created: 2018-07-29T14:08:26.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-31T08:58:34.000Z (over 2 years ago)
- Last Synced: 2024-04-15T02:45:09.384Z (over 1 year ago)
- Topics: avatar, avatars, profile-image, profile-picture, social-media, social-network
- Language: JavaScript
- Homepage: https://avatar-redirect.evens.eu
- Size: 54.7 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Avatar Redirect
[](https://circleci.com/gh/JorgenEvens/avatar-redirect)
Redirects to a user's profile picture on any of the supported social networks.
Currently supported:
- Skype
- VkontakteLooking for an easy way to plug this service into React? Check out [react-avatar](https://github.com/Sitebase/react-avatar).
Example:

## Deployment
### Google App Engine
Requires the [Google Cloud SDK](https://cloud.google.com/sdk/) to be installed
Modify any of the settings in the `app.yaml` file.
```sh
gcloud config set project
gcloud app deploy
```### Heroku
Push this repository to a Heroku app or use the Deploy to Heroku button.
[](https://heroku.com/deploy)
## Usage
Each avatar URL follows the same base format which is `//`, for Twitter this would be `https://avatar-redirect.appspot.com/twitter/jorgenevens`.
If you are simply trying to show an avatar that would look something like this in HTML:
```html
![]()
```## Configuration
The app is configured using environment variables which you either add to your `app.yaml` file or set using the Heroku CLI / Dashboard.
| Environment variable | Description | Default value |
| --- | --- | --- |
| REDIS\_URL | connectionString used to connect to a Redis cache | `undefined` |
| MEMCACHE\_URL | connectionString used to connect to a Memcache instance | `undefined` |
| TTL\_PROFILE\_PICTURE | The duration for which the picture URL is cached in ms | `3600000` (1 hour) |
| LIMIT\_REFERER | A regular expression matched against the [Referer header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer). If the Referer does not match a `401 Unauthorized` will be returned. | `undefined` |
| LOG\_FORMAT | A valid log format as specified in the [morgan documentation](https://github.com/expressjs/morgan#predefined-formats) | `"combined"` |
| | | |
| **Network Configuration** | | |
| NETWORKS | The social networks available to this deployment, if no value is set all are enabled. | `undefined` |
| VKONTAKTE\_KEY | A [Vkontakte service key](https://vk.com/dev/access_token?f=3.%20Service%20Token) to perform API requests with. | `undefined` |
| VKONTAKTE\_API\_VERSION | The API version to use for Vkontakte | `"5.101"` |
| GOOGLE\_API\_KEY | The [API Key](https://console.cloud.google.com/apis/credentials) to a Google Cloud Platform project that has access to the People API. | `undefined` |## Contributing
I really appreciate any contribution you would like to make, so don't hesitate to report an issue or submit pull requests.
## About me
Hi, my name is [Jorgen Evens](https://jorgen.evens.eu). By day I built things (mainly in PHP and JavaScript) for [employee advocacy platform Ambassify](https://www.ambassify.com) and by night I tinker around with these kinds of projects.