What's this User Icons business?
In short, NodeBB used to use Gravatar to generate default icons for guests and users. However, while this approach was novel in terms of forums, there were some concerns over extensibility and user privacy, and so we set out to revamp the system to remove our dependency on Gravatar.
How does this affect me, as a forum owner?
It shouldn't. Next time you upgrade...
All of your users currently using gravatar will remain using gravatar. See below
- Any new users will have a user icon generated
- If you had a custom default avatar set, the default should still be properly set.
How does this affect me, as a plugin or theme developer?
You'll need to update your themes and plugins and change every invocation of the user avatar to include a conditional.
For example, investigate this diff:
- <img src="{groups.members.picture}" />
+ <!-- IF groups.members.picture -->
+ <img src="{groups.members.picture}" />
+ <!-- ELSE -->
+ <div class="user-icon" style="background-color: {groups.members.icon:bgColor};">{groups.members.icon:text}</div>
+ <!-- ENDIF groups.members.picture -->
- Instead of an single image tag, there is now a conditional (
<!-- IF picture -->
).
- The
div
contains the user icon in lieu of a picture.
- The
user-icon
class is required
Adjust as needed for your own plugin.