V8: Larger user avatars?
Permalink 1 user found helpful
Hi,
In C5 v8 can I output a larger Avatar than I get using the simple print $avatar->output(); method?
I can't seem to use getThumbnail or get the file ID to output a larger image.
Thanks
Dave
In C5 v8 can I output a larger Avatar than I get using the simple print $avatar->output(); method?
I can't seem to use getThumbnail or get the file ID to output a larger image.
Thanks
Dave
Hi mate,
Thanks for this but adding those lines to concrete.php doesn't seem to do anything the avatar still appears 80x80, is my /application/config/concrete.php correct?
Thanks for this but adding those lines to concrete.php doesn't seem to do anything the avatar still appears 80x80, is my /application/config/concrete.php correct?
@madesimplemedia
Changing the config setting does not change the size of existing avatar images. You have to recreate them.
Changing the config setting does not change the size of existing avatar images. You have to recreate them.
It looks like the output() method returns a string with the img tag and attributes. The image it returns looks to be a specific version, not the original.
https://github.com/concrete5/concrete5/blob/8.0/concrete/src/User/Av...
https://github.com/concrete5/concrete5/blob/8.0/concrete/src/User/Av...
I am not sure how, or if, you can get the underlying file object that is used to create the avatar image.
An alternative to getting the original file object would be setting custom width and height for avatars.
https://github.com/concrete5/concrete5/blob/develop/concrete/config/...
Example: change avatar max width/height from 80px to 300px
application\config\concrete.php