New dimensions are achieved by cropping to maintain ratio.
public static resize ( string $src, integer | string $w, integer $h, string $crop = 'default', boolean $force = false ) : string | ||
$src | string | an URL (absolute or relative) to the original image |
$w | integer | string | target width(int) or WordPress image size (WP-set or user-defined). |
$h | integer | target height (ignored if $w is WP image size). If not set, will ignore and resize based on $w only. |
$crop | string | your choices are 'default', 'center', 'top', 'bottom', 'left', 'right' |
$force | boolean | |
return | string | (ex: ) |