digitalpoint
Well-known member
There are a few containers that are nothing but hardcoded image resizing settings. Specifically these:
The profile banner size isn't large enough to take advantage of high dpi monitors/screens, so I wanted to change it. Being that these containers don't have any code, and are just settings, wouldn't it be more appropriate for them to exist as Options?
Not super excited about needing to create a class/more PHP files that need to be included with every request to alter a container for what is essentially changing an image size setting.
Seeing that avatar and profile banners default sizes are evenly divisible, maybe it would make sense to leave the container, which simply does the size calculations based on a new "max size" setting for each. That also would maintain backward compatibility for those that have overridden the containers already.
PHP:
$container['avatarSizeMap'] = [
'o' => 384,
'h' => 384,
'l' => 192,
'm' => 96,
's' => 48
];
$container['editorToolbarSizes'] = [
'SM' => 420,
'MD' => 575,
'LG' => 900
];
$container['profileBannerSizeMap'] = [
'l' => 1280,
'm' => 640
];
The profile banner size isn't large enough to take advantage of high dpi monitors/screens, so I wanted to change it. Being that these containers don't have any code, and are just settings, wouldn't it be more appropriate for them to exist as Options?
Not super excited about needing to create a class/more PHP files that need to be included with every request to alter a container for what is essentially changing an image size setting.
Seeing that avatar and profile banners default sizes are evenly divisible, maybe it would make sense to leave the container, which simply does the size calculations based on a new "max size" setting for each. That also would maintain backward compatibility for those that have overridden the containers already.
Upvote
1