to define a size using an default size : {define_derivative name='NAME' type='TYPE'} where NAME is the name of the derivative created (use it like $pwg→derivative($NAME, $src-image), and TYPE can have the values : square, thumb, 2small, xsmall, small, medium, large, xlarge, xxlarge. The sizes corresponding to these types are available in Configuration → Options → Photo sizes
to define a new size : {define_derivative name='NAME' width='WIDTH' height='HEIGHT' crop=true/false min_height='MIN_HEIGHT' min_width='MIN_WIDTH'} where NAME is the name of the derivative created (use it like $pwg→derivative($NAME, $src-image), WIDTH and HEIGHT are required and must be numeric values, the attribute crop is optional (default value false), and the attributes min_width and min_height are also optional (only numeric value)
to get a url of a picture according to the NAME derivative : {$pwg→derivative_url($NAME, 'src of the original picture')} OR {assign var=my_derivative value=$pwg→derivative($NAME, 'src of the original picture')} with {$my_derivative→get_url()}
List of functions available as {$my_derivative→function()} :
get_path() returns the path of the resized picture
get_url() ) returns the url of the resized picture
same_as_source() returns true if the picture has not been resized
get_type() Orignal or Type where type can be square, thumb, 2small, xsmall, small, medium, large, xlarge, xxlarge and custom
get_size() returns the size of the derivative image as an array : Array { 'width', 'height'}
get_size_htm() return the string 'width=”'.$size[0].'” height=”'.$size[1].'”'
get_size_hr() returns the string $size[0].' x '.$size[1]
get_scaled_size($maxw, $maxh) needs maximum width and maximum height, and returns the new size needed for a scaled reduction
get_scaled_size_htm($maxw=9999, $maxh=9999) return the string 'width=”'.$size[0].'” height=”'.$size[1].'”' where the array size is the size returned by get_scaled_size($maxw, $maxh)
is_cached() return true if the resized picture exists or need to be created via i.php : useful for Ajax loading
List of functions available as template function ie {$pwg→function($NAME, 'src of the original picture')}
derivative_url($type, $img) returns the url of the resized picture