**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 file system or in an user's property; 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 EAR deployment defined in the "brother" module [keycloak-d4science-spi](../keycloak-d4science-spi-ear/README.md).
To build the JAR artifact it is sufficient to type
In order to deploy the module it is sufficient to copy into the `[keycloak-home]/providers` folder.
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:
( For example: `spi-avatar-storage-avatar-storage-file-avatar-folder=/opt/keycloak/avatar` )
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: