$dimensions = ['width' => $settings['box_width'], 'height' => $settings['box_height']];
if (!empty($settings['box_style'])) {
$box_style = ImageStyle::load($settings['box_style']);
$dimensions = ['width' => $settings['box_width'], 'height' => $settings['box_height']];
if (!empty($settings['box_style'])) {
$box_style = ImageStyle::load($settings['box_style']);