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. Click Extend > Extend.
  3. In the Filter field, enter avatar to view the list of all the available avatar modules.
  4. Select the Robohash checkbox and click Enable to enable the selected avatar module.

    An image of selecting Robohash module from the list

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. Navigate to Configuration > People > Avatar settings.
  2. Click + Add avatar generator.
  3. Enter Robohash as the label.
  4. Select Robohash from the Avatar generator options.
  5. Click Save.

    An image of add avatar generator screen

  6. The Edit avatar generator Robohash page opens. Select the following options:
    • Type: Robot Heads
    • Background: Transparent

    An image showing the edit avatar screen

  7. Click Save.
  8. The Avatar Kit settings page opens. Under the Avatar Generator column, drag Robohash to be first in the list, and select the Enabled checkbox.
  9. Click Save configuration to save the changes.

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. Navigate to People > People and click the Permissions tab.
  2. Find Use Robohash under the permission type Avatar Kit and select the Authenticated user checkbox to enable the avatar generator for all authenticated users.
    Note: Once you select the Authenticated user checkbox, all the checkboxes for this user type are automatically selected because all of those users have the same permissions as an authenticated user, or higher.

    An image showing the Permission screen

  3. Click Save permissions to save the changes.

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.