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';
}

Reviews on WordPress.org

Trusted by thousands of businesses

★★★★★

"Created an online museum for my club. Really impressive plugin. Support was responsive and helpful."

@hackrepair

★★★★★

"Excellent, clean, simple inventory management. Well structured code — use it right away or customize it to your liking."

@techlocally

★★★★★

"We purchased the entire suite. Installation was easy, small issues were fixed immediately, and the guidance during setup was invaluable."

@design4dotcom

★★★★★

"Plugin support was helpful and rapid. Highest mark."

@drgar

★★★★★

"Great support. Very thorough when looking for a solution, and upfront with exactly how to fix it or institute a workaround."

@shoidahl

★★★★★

"I used this plugin and eventually hired the developers for all my WordPress work. Responsive, competent, and clean code. Would recommend to anyone."

@justenhong