By default, the plugin uses the ‘thumbnail’ size for add-on images. This is normally set by your theme.
If you’d like to use a different size for the add-on image, use the first function in the snippet below:
If you’d like to change the size of the image swatch images, use the second function.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Use a different size for add-on images | |
*/ | |
function prefix_field_image_size( $size ) { | |
return 'large'; | |
} | |
add_filter( 'pewc_filter_field_image_size', 'prefix_field_image_size', 10 ); | |
/** | |
* Use a different size for image swatch images | |
*/ | |
function prefix_image_swatch_thumbnail_size( $size, $item ) { | |
return 'large'; | |
} | |
add_filter( 'pewc_image_swatch_thumbnail_size', 'prefix_image_swatch_thumbnail_size', 10, 2 ); |
Here’s how to add the snippet.