Changing Default Avatar

Hello All,

I am new to elgg and have learnt a few things recently. However, I will like to change the default avatar created by elgg for new users. I initially tried to override _graphics/icons/user in my new plugin. I created same path in my plugin but the default avatar did not change. I then deleted the default avatar images and replaced them with mine but the site still loads the default avatar, even for newly registered user. Any advise on how to go about resolving this issue?

  • elgg_register_plugin_hook_handler('entity:icon:url', 'user', 'my_plugin_avatar_url');

    See the profile_override_avatar_url function in the core profile plugin for an example of how to use the hook

  • Thanks Matt. Based on your advise, I overrode icondirect.php and specified the path to my icons. However, I did not have to add "elgg_register_plugin_hook_handler('entity:icon:url', 'user', 'my_plugin_avatar_url')" to the start.php of my theme.

  • Hi. As per my earlier comment. The elgg site used the default images I overrode. When I replaced the default images, the site loaded the original images and ignored the ones I had in my theme. I had to do a full implementation as suggested by Matt. Now everything is working perfectly.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking