- Merge request !173#3551675 allow overriding avatar in the $context param of hook_autocomplete_match_alter → (Open) created by loze
I have 2 related requests pertaining to user lists avatars.
1. In
✨
Allow setting of the user image style in widget settings
Active
we added the ability to set the user avatar image style, which has been very helpful.
However, after using this feature for a while, I think it would be better to define the image style in a single place: the main configuration form at /admin/config/tagify/settings, and use that setting globally.
There doesn’t seem to be a practical use case for having a different image style per field since the avatar is always displayed the same way.
The original reason for having this per-field option was to handle cases where the site’s “thumbnail” style wasn’t square, but we can achieve the same flexibility by defining it once in configuration. This would also simplify the code because we wouldn’t need to pass the style through the render array in multiple places as we do now, since it could be retrieved directly from config.
2. I’d like to be able to override the avatar for a specific user in some cases and also the default image used for user lists in hook_tagify_autocomplete_match_alter(), in the same place where the label can be altered.
Currently, the avatar is set after this hook is called, which makes that impossible. It should be straightforward to fix this by setting the avatar earlier and passing it along in the $context for that hook.
I will work on a MR for both.
Active
1.2
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.