Thank you very much for your help, really.
I can now crop it as I want, but when it is displayed on the profile, it is still square and not the cropped image in a rectangle.Could you tell me why?
By default, Elgg config has these sizes for avatars:
'icon_sizes' => [
'topbar' => ['w' => 16, 'h' => 16, 'square' => true, 'upscale' => true],
'tiny' => ['w' => 25, 'h' => 25, 'square' => true, 'upscale' => true],
'small' => ['w' => 40, 'h' => 40, 'square' => true, 'upscale' => true],
'medium' => ['w' => 100, 'h' => 100, 'square' => true, 'upscale' => true],
'large' => ['w' => 200, 'h' => 200, 'square' => true, 'upscale' => true],
'master' => ['w' => 10240, 'h' => 10240, 'square' => false, 'upscale' => false, 'crop' => false],
],
You can override this config via custom plugin.
Use My plugin again.
1 - Open elgg-plugin.php and add this code before last ];
'events' => [
'entity:icon:sizes' => [
'group' => [
\MyPlugin\SetIconSizes::class => [],
],
'user' => [
\MyPlugin\SetIconSizes::class => [],
],
],
],
Please note:
It worked perfectly! Thank you so much, really. You saved me. Big hug.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.