Letter Default Avatar
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
Provide letter avatars for users without pictures.
This module will generate a default avatar for anyone without one and can optionally attach it to the user entity (with a flag set to be able to understand that it's a default avatar) so that it'll work in places like Views listings without issues.
Due to the availability, or lack of availability of ImageMagick when it comes to PHP instead of using a font file to generate the avatar images we overlay a character image over a randomly selected colour background. This means the module itself is larger than the usual module. The default font is Helvetica though you can add others.
This module alters the {users} table to add a new entity property "default_avatar". It also overrides the Views handler for user picture to get consistent markup and the default filter for the picture property so it checks the new {users} schema field default_avatar.
Currently in use by the Harmony Forum distro.
// @ todo
- Better valid character detection
- Drush command to process any users without an avatar (when the site attempts to output an avatar it'll generate one, this command would prevent a stampede)
