**Avatar Realm Resource** defines the new avatar resource inside Keycloak and exposes it on REST, implements the SPI defined in the `avatar-storage` module to store avatars on a S3 persistence, on file system or in an user's property; the use of the last option is discouraged since the DB's property mapping could be limited by the JDBC driver/JPA settings/DB defaults.
This is one of the modules that composes the (DEPRECATED) EAR deployment defined in the "brother" module [keycloak-d4science-spi](../keycloak-d4science-spi-ear/README.md).
The type of the storage to be used is configured in the `org.gcube.keycloak.avatar.storage.AvatarStorageProviderFactory` file under the `META-INF/services/` folder of the module source/JAR.
If you need to customize the folder where avatars images are saved (defaulting `[user-home]/avatar`) you can add the following line to the `[keycloak-home]/conf/keycloak.conf` file:
By default the `username` of the user is used as a filename for the image into the filesystem but is possible to use the user's email simply adding the following line in the previously seen configuration file: