' . $element['alt'] . ' '; return $template; } static function getImageDimensions($element, $column_count) { $column_width = ColumnsHelper::columnWidth($column_count); $padded_width = StylesHelper::$padding_width * 2; // resize image if it's wider than the column width if((int) $element['width'] >= $column_width) { $ratio = (int) $element['width'] / $column_width; $element['width'] = $column_width; $element['height'] = ceil((int) $element['height'] / $ratio); } if($element['padded'] == "true" && $element['width'] >= $column_width) { // resize image if the padded option is on $ratio = (int) $element['width'] / ((int) $element['width'] - $padded_width); $element['width'] = (int) $element['width'] - $padded_width; $element['height'] = ceil((int) $element['height'] / $ratio); $element['paddedClass'] = 'mailpoet_padded'; } else { $element['width'] = (int) $element['width']; $element['height'] = (int) $element['height']; $element['paddedClass'] = ''; } return $element; } }