This is an example implementation of DiceBear Avatars for WordPress comments.
You can see a demo for this plugin at the bottom of this post:
https://unwanted.cloud/2022/09/24/nanoleaf-privacy-review/
Screenshot:
https://snippets.khromov.se/wp-content/uploads/2022/09/dicebear-avatars.png
Aside from implementing the DiceBear Micah avatar style, this plugin also removes the website and email fields from the WordPress comments form. This means names are used for avatar generation for anonymous users, and user ID:s are used for logged in users.
You can use the official DiceBear CDN or self-host your own avatar server for increased privacy.
- Activate the plugin
- Go to Settings > Discussion > Default avatar and select "Dicebear: Micah"
You can further customize the plugin with constants:
Set a custom avatars server
You can deploy this via Docker using this image.
define( 'DICEBEAR_AVATARS_BASE_URL', 'https://avatars.unwanted.cloud' );
Set a custom salt for avatar generation
This ensures that if emails are used to generate avatars, it is impossible to reverse the emails. You can also change this if you ever want to reset all avatars.
define( 'DICEBEAR_SALT', '1234567' );