Tutorial: Using avatars

You can use an avatar generator to better represent the branding of your site, and add a sense of community for your users, than the default name initial that is provided in the Developer Portal.

Before you begin

You must have a Developer Portal enabled, and you must have administrator access to complete this tutorial. The tutorial Creating the Portal explains how to enable the portal if you have not already done so.

About this tutorial

In this task, you add the Robohash avatar generator to your Developer Portal site, and assign it as the primary avatar generator for all users.

The avatar of the admin user displays like this before the block is added. An image of the avatar for the admin id before any changes

Enable the Robohash avatar generator

  1. Log in to your Developer Portal as an administrator.
  2. If the administrator dashboard isn’t displayed, click Manage to display it.
  3. Click Extend.
  4. In the text box, enter avatar in the Block description.
  5. Check the Robohash box, click Enable.

    An image of adding a module screen

When the module is enabled, you receive a Module Robohash has been enabled message.

Set Robohash as the preferred avatar generator for your site

  1. If the administrator dashboard isn’t displayed, click Manage to display it.
  2. Navigate to Configuration > People > Avatar settings.
  3. Click + Add avatar generator.
  4. Enter Robohash as the label.
  5. Check Robohash for the avatar generator.
  6. Click Save

    An image of the add avator generator screen

  7. You are then taken to the Edit avatar generator Robohash page. Select Type: Robot Heads and Background: Transparent. Click Save.

    An image showing the edit avatar screen

  8. You are now on the avatar generator page. Drag Robohash to be first in the list, and check Enabled, then click Save configuration.

You have now set Robohash as the preferred avatar generator for your site.

Configure the permissions for the Robohash avatar generator

The default setting for the Robohash avatar generator is to generate avatars for users with superuser access only. In this example, the permissions are changed so that all authenticated users can access Robohash.

  1. If the administrator dashboard isn’t displayed, click Manage to display it.
  2. Navigate to People > Permissions.
  3. Find Use Robohash under the permission type Avatar Kit.
  4. Check AUTHENTICATED USER for Use Robohash to enable the generator for all authenticated users.

    Notice that all the boxes for this user type are then automatically checked because all of those users have the same permissions as an authenticated user, or higher.

    An image showing the permissions screen

  5. Click Save permissions.

What you did in this tutorial

The avatars of all users now have the robohash avatar.

You can check that the avatar of the admin user has changed by looking at your site page.

An image of the avatar for the admin id after any changes

You can check that the avatars of other users have changed by finding their published content and looking for their avatar. Or, you can navigate to Manage > People, click a user, and see their avatar on their profile page.

An aimge of a user profile after the change

What to do next

You can disable the robohash avatar generator.
  1. Navigating to Extend > Disable module.
  2. Search for avatar in the filter text box.
  3. Check Robohash, click Disable
  4. Click Disable.

You can also disable the robohash avatar generator by clearing it within Configuration > People > Avatar settings, or, reducing its preference by dragging it to a different order in the list. Click Save configuration.