|
1 | | -# Gravatar Support in Meh |
| 1 | +# Avatar Support in Meh |
2 | 2 |
|
3 | | -Meh integrates with [Gravatar](https://gravatar.com/) to display user avatars next to comments. This provides a familiar and consistent way for commenters to have their profile images appear across different websites. |
| 3 | +By default, Meh integrates with [Gravatar](https://gravatar.com/) to display user avatars next to comments. This provides a familiar and consistent way for commenters to have their profile images appear across different websites. However, Meh can also generate avatars locally without sending any data to Gravatar. |
4 | 4 |
|
5 | 5 | ## How It Works |
6 | 6 |
|
7 | | -When a comment is displayed: |
8 | | - |
9 | | -1. Meh checks if the comment has a custom avatar URL (e.g., from Mastodon imports) |
10 | | -2. If not, it generates a Gravatar URL based on the commenter's email address or name |
11 | | -3. The Gravatar service returns either: |
12 | | - - The user's Gravatar image if they have one registered |
13 | | - - A fallback image based on your configuration |
| 7 | +1. Meh will always prefer a custom avatar URL if provided (like from Mastodon imports). |
| 8 | +2. If no custom avatar is available, or it fails to load, Meh will either generate a local avatar or use Gravatar. |
| 9 | +3. If Gravatar is used and the user has no Gravatar image, a fallback image is displayed which again can be local or from Gravatar. |
14 | 10 |
|
15 | 11 | ## Configuration |
16 | 12 |
|
17 | | -You can configure Gravatar behavior using these settings: |
| 13 | +First decide whether you want to use Gravatar or local avatars. You can set this in the configuration: |
| 14 | + |
| 15 | +```bash |
| 16 | +# Use Gravatar |
| 17 | +./meh config avatar gravatar |
| 18 | + |
| 19 | +# Use locally generated ring avatars |
| 20 | +./meh config avatar ring |
| 21 | +``` |
| 22 | + |
| 23 | +See below for available local avatar types. |
| 24 | + |
| 25 | +When using Gravatar, you can also set the default avatar type and content rating. This is done in the same way as other configuration options: |
18 | 26 |
|
19 | 27 | ``` |
20 | 28 | # Set the fallback image type |
21 | | -./meh config gravatar_fallback "initials" |
| 29 | +./meh config gravatar_fallback monsterid |
22 | 30 |
|
23 | 31 | # Set the content rating |
24 | 32 | ./meh config gravatar_rating "g" |
25 | 33 | ``` |
26 | 34 |
|
27 | | -### Fallback Options |
| 35 | +See below for available avatar types. |
| 36 | + |
| 37 | +### Avatar Types |
| 38 | + |
| 39 | +The following avatar types can be used as either a fallback Gravatar or a locally generated avatar. |
28 | 40 |
|
29 | | -When a user doesn't have a Gravatar, you can choose what appears instead: |
| 41 | +| Avatar Type | Local | Gravatar Fallback | Description | |
| 42 | +|---------------|-------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 43 | +| `mp` | Yes | Yes | Mystery Person silhouette | |
| 44 | +| `ring` | Yes | Yes | Three ring segments forming a unique pattern | |
| 45 | +| `multiavatar` | Yes | Yes | Colorful multicultural avatar. See [multiavatar.com](https://multiavatar.com/) | |
| 46 | +| `identicon` | Yes | Yes | Geometric pattern (default gravatar fallback) | |
| 47 | +| `monsterid` | No | Yes | Generated "monster" avatar (did you know those were [invented by Meh's creator](https://www.splitbrain.org/blog/2007-01/20_monsterid_as_gravatar_fallback)?) | |
| 48 | +| `wavatar` | No | Yes | Generated face | |
| 49 | +| `retro` | No | Yes | 8-bit style pixelated face | |
| 50 | +| `robohash` | No | Yes | Robot avatar | |
| 51 | +| `blank` | Yes | Yes | Transparent image | |
| 52 | +| Custom URL | No | Yes | Any URL to a custom default image | |
30 | 53 |
|
31 | | -- `initials`: Generates an image with the user's initials (default) |
32 | | -- `mp`: Mystery Person silhouette |
33 | | -- `identicon`: Geometric pattern |
34 | | -- `monsterid`: Generated "monster" avatar (did you know those were [invented by Meh's creator](https://www.splitbrain.org/blog/2007-01/20_monsterid_as_gravatar_fallback)?) |
35 | | -- `wavatar`: Generated face |
36 | | -- `retro`: 8-bit style pixelated face |
37 | | -- `robohash`: Robot avatar |
38 | | -- `blank`: Transparent image |
39 | | -- Or any URL to a custom default image |
| 54 | +Please note that the `initials` setting is no longer available to streamline the avatar generation process. |
40 | 55 |
|
41 | 56 | ### Content Rating |
42 | 57 |
|
|
0 commit comments