Filtering the images field sizes

If you would like to set the images size differently for the listing or display using some easy to use filters, here is how.  Copy and paste the below code into your function.php file:


add_filter( 'wpim_images_size', 'my_function', 10, 2 );

/**
* Return a custom size for images (vs image)
* @param string $size - original size from settings
* @param string $context - detail or listing
*
* @return string - should be thumbnail, medium, large, full
**/
function my_function( $size, $context ) {
if ( 'detail' == $context ) {
// this value is used for detail / single
return 'full';
}

// this value is used for listing
return 'large';
}