A larger Avatar

Permalink
Is there any way to make the small Avatar photo/picture (80x80) for profiles allow larger images?

I think it involves setting a global variable, maybe AVATAR_WIDTH, but am not sure how.

Thanks!

gelie
 
Mnkras replied on at Permalink Reply
Mnkras
in your site.php stick these in:

define('AVATAR_WIDTH', 80);
define('AVATAR_HEIGHT', 80);

change 80 to what you want :)
gelie replied on at Permalink Reply
gelie
Hey, thanks for the help, however, when I changed it in config/site.php, I got the actual box for the picture larger on my webpages but the original upload (that I re-uploaded) saved at 80x80 and so it's all blurry. Any other ideas?
gelie replied on at Permalink Reply
gelie
I finally got this to work by editing the heights variables and making sure that the image would display in those dimensions, but now the avatar editor flash thing doesn't work, and leaves the square box (old dimensions) into the actual image when saved. Any ideas on how to fix this?
teknojunkey replied on at Permalink Reply
teknojunkey
i edited concrete/config/base.php line416
define('AVATAR_WIDTH', 160);
define('AVATAR_HEIGHT', 160);
this fixes the avatar resolution
kirkroberts replied on at Permalink Reply
kirkroberts
In response to teknojunkie's post, do NOT set this in /concrete/config ...

... follow Mnkras's advice and put those settings in your /config/site.php file.
Otherwise your changes will be overwritten when/if you upgrade your c5 installation.
SoulDesigns replied on at Permalink Reply
SoulDesigns
I followed Mnkras's instructions. What I want to change is the output size of the Avatar on a blog post. Even following his instruction the avatar on the blog posting is still 60x60
dzimney replied on at Permalink Reply
dzimney
I'm not sure why this is, but it appears to have the change stick to both the avatar images and in the flash avatar uploader, AVATAR_WIDTH and AVATAR_HEIGHT have to be set in both the /config/site.php and in /config/site_theme_paths.php. This is as of 5.6.2.1.
dzimney replied on at Permalink Reply
dzimney
Probably a good idea to add checks in both places to see if the constants have been defined...

if( !defined(AVATAR_WIDTH) ) define('AVATAR_WIDTH', 200);
if( !defined(AVATAR_HEIGHT) ) define('AVATAR_HEIGHT', 200);
abigwonderful replied on at Permalink Reply
abigwonderful
Does anyone know how to do this in 5.7? I'm just looking to customize the avatar size/dimensions.

I'm assuming the application/config/generated_overrides/concrete.php file is the place to start, but which array and the actual attributes to use are eluding me. Any guidance would be helpful!
MrKDilkington replied on at Permalink Reply
MrKDilkington
@abigwonderful

The settings appear to be in concrete\config\concrete.php. The default avatar width and height are both 80 (80px).
https://github.com/concrete5/concrete5/blob/develop/web/concrete/con...

Example: change the avatar size to 150px by 150px
- open concrete.php
application\config\concrete.php
- if you don't have a concrete.php file with that path, create one
- add the following code
<?php
return array(
    'icons' => array(
        'user_avatar' => array(
            'width'   => 150,
            'height'  => 150,
            'default' => ASSETS_URL_IMAGES . '/avatar_none.png'
        )
    ),
);
abigwonderful replied on at Permalink Reply
abigwonderful
Great thanks! That github link is a huge resource!