For users, the system supports, in addition to locally stored avatar images, also Gravatars (globally recognized avatars). Gravatar is an avatar hosting service that allows the user to register their e‑mail address and upload an associated image. This image is then automatically provided as avatar on all sites with Gravatar support, where the user can be identified through the specified e‑mail address.
On Kentico sites, this address is taken from the settings of registered users. In the case of public (unauthenticated) visitors, the system checks whether the visitor entered an e‑mail address when leaving comments or posting on forums.
By default, the gravatars functionality is disabled. If you want to use gravatars on your website, you need to adjust the Avatar type setting in Settings -> Community -> Avatars.
The Avatar type setting determines what avatar type is allowed. You can choose from the following options:
- Avatar - only the standard avatars stored locally in the system are available. Gravatars are not allowed. Users can either upload their own image or choose a predefined one.
- Gravatar - Gravatars are used for all users and visitors. When displaying avatars, the system automatically checks the user’s e‑mail address. If a matching Gravatar is found, it is loaded and displayed. Users who don’t have a Gravatar registered, same as public visitors with no e‑mail address specified in the system, have a default avatar image assigned. Selecting this option changes the avatars of the users who uploaded their custom images locally. However, it has no effect on group avatars.
- User can choose - both the options are available. The registered users can choose if they want to use a Gravatar or a local avatar. Gravatar support is enabled for public visitors.
When using Gravatars, users can view their avatar image in their profiles only, and cannot change the image locally. If the User can choose option is selected, users can switch between the two modes.
The Gravatar default image setting determines what image is displayed as avatar of the users who don’t have a valid Gravatar registered for their e‑mail address. If you select (none), the system uses a local avatar image specified in the Avatars application as default for users. The other options provide various types of default Gravatar image sets. In most cases, a different image is generated based on the user’s e-mail address. This means that even users with no Gravatar account have a unique avatar image assigned.
Changing Gravatar rating
All Gravatar images are rated based on the maturity level of their content. You can specify the maximum rating allowed on your site by configuring the Gravatar rating setting. The system offers the following ratings:
- G - suitable for display on all sites with any audience type.
- PG - can contain rude gestures, provocatively dressed individuals, lesser swear words, and mild violence.
- R - can contain things such as harsh profanity, intense violence, nudity, and hard drug use.
- X - can contain hardcore sexual imagery, and extremely disturbing violence.
If a user’s Gravatar doesn’t meet the website’s rating requirements, it is replaced by a default image.
Gravatars are user-rated
The rating of a Gravatar image is entered by its owner. This means we cannot guarantee that inappropriate images are filtered out if their rating is inaccurate.
Displaying Gravatars in transformations
If you want to display Gravatars in member lists or on any other types of pages where user avatars are presented, you need to modify the corresponding transformations.
Not all transformation methods used to generate avatar image tags support displaying Gravatars. See Displaying avatars in transformations.