How to change the image size of a review

In order to display the image thumbnail in the review box, we are using the thumbnail image setting, which usually is 150x150 by default, to change this default you can go to Settings->Media, change the width and height then Force Regenerate Thumbnails using this plugin: https://wordpress.org/plugins/regenerate-thumbnails/

If your theme is making use of the default thumbnail value, then changing it would make the old images in the places where your theme uses that setting to display in the new size which you set.

In this situation you will need to add a new image size in functions.php of your child theme and then use a filter to pass it to our plugin. If you don't have a child theme then you can use this plugin to create a quick site specific plugin where you can add the code: https://wordpress.org/plugins/pluginception/

1. Add Image size 

add_image_size( 'new-size', 150, 150, true ); //(cropped)

2. Then you can use the    wppr_review_image_size filter. Here you have a code snippet that will do the trick.

add_filter( 'wppr_review_image_size','wppr_review_image_size_filter_demo',10,2 );
 
function wppr_review_image_size_filter_demo($post_id ) {
 	 //change the image size according to your needs;

	return "new-size"; //this is the actual name of the new size
}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us