Skip to content

Commit 5e5f009

Browse files
committed
updated docs on avatars
1 parent 08cfedf commit 5e5f009

File tree

2 files changed

+38
-23
lines changed

2 files changed

+38
-23
lines changed

backend/src/App.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function loadConfigFromDefaults(): array
8282
'mastodon_account' => '',
8383
'mastodon_token' => '',
8484
'avatar' => 'gravatar',
85-
'gravatar_fallback' => 'initials',
85+
'gravatar_fallback' => 'identicon',
8686
'gravatar_rating' => 'g',
8787
'notify_email' => '',
8888
'smtp_host' => 'localhost',

doc/gravatar.md

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,57 @@
1-
# Gravatar Support in Meh
1+
# Avatar Support in Meh
22

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.
44

55
## How It Works
66

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.
1410

1511
## Configuration
1612

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:
1826

1927
```
2028
# Set the fallback image type
21-
./meh config gravatar_fallback "initials"
29+
./meh config gravatar_fallback monsterid
2230
2331
# Set the content rating
2432
./meh config gravatar_rating "g"
2533
```
2634

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.
2840

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 |
3053

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.
4055

4156
### Content Rating
4257

0 commit comments

Comments
 (0)