Title: Thumbnail posts same size?
Last modified: April 30, 2020

---

# Thumbnail posts same size?

 *  Resolved [dviolante](https://wordpress.org/support/users/dviolante/)
 * (@dviolante)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/thumbnail-posts-same-size/)
 * Hello, is any way to make that all thumbnails shown in the related posts for 
   wp plugin be in the same size? ofr example all 130px x 85px. I have many vertical
   and horizontal images, and i want that the images in Related Posts all be horizontal.
 * In the following image you can see that thumbs are showing in diferent sizes.
   
   [https://drive.google.com/file/d/1OkyEaSABGkusO0eooLJzkATTsFgMXjWp/view?usp=sharing](https://drive.google.com/file/d/1OkyEaSABGkusO0eooLJzkATTsFgMXjWp/view?usp=sharing)
 * Any idea how to achieve this?
    Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fthumbnail-posts-same-size%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Harish Chouhan](https://wordpress.org/support/users/hchouhan/)
 * (@hchouhan)
 * [6 years ago](https://wordpress.org/support/topic/thumbnail-posts-same-size/#post-12792289)
 * Hey [@dviolante](https://wordpress.org/support/users/dviolante/),
 * Thanks for reaching out to us.
 * You will need a filter to change this. First, you will need to define a custom
   thumbnail size and then you can use the filter function provided at [https://www.relatedpostsforwp.com/documentation/changing-the-thumbnail-size/](https://www.relatedpostsforwp.com/documentation/changing-the-thumbnail-size/)
   to use your custom thumbnail size for images displayed by our plugin.
 *  Thread Starter [dviolante](https://wordpress.org/support/users/dviolante/)
 * (@dviolante)
 * [6 years ago](https://wordpress.org/support/topic/thumbnail-posts-same-size/#post-12818147)
 * Hello Harish, thanks a lot for your response.
    Could you please tell me if this
   code is correct?
 * add_image_size( ‘my-thumbnail-size’, 150, 84 );
 * function rp4wp_example_my_thumbnail_size( $thumb_size ) {
    return ‘my-thumbnail-
   size’; }
 * add_filter( ‘rp4wp_thumbnail_size’, ‘rp4wp_example_my_thumbnail_size’ );
 * Thanks
 *  [Harish Chouhan](https://wordpress.org/support/users/hchouhan/)
 * (@hchouhan)
 * [6 years ago](https://wordpress.org/support/topic/thumbnail-posts-same-size/#post-12829322)
 * Hey [@dviolante](https://wordpress.org/support/users/dviolante/),
 * Yes, that is correct. Please make sure to use a plugin such as [https://wordpress.org/plugins/regenerate-thumbnails/](https://wordpress.org/plugins/regenerate-thumbnails/)
   to regenerate all the thumbnails.
 *  Thread Starter [dviolante](https://wordpress.org/support/users/dviolante/)
 * (@dviolante)
 * [6 years ago](https://wordpress.org/support/topic/thumbnail-posts-same-size/#post-12830898)
 * Hello, yes, im using that plugin! Thanks.
 * I was missing something in the function code: true before height. With this now
   my thumbs are regenerated a the exact 150 x 84 size.
 * add_image_size( ‘my-thumbnail-size’, 150, 84, **true** );
 * function rp4wp_example_my_thumbnail_size( $thumb_size ) {
    return ‘my-thumbnail-
   size’; }
 * add_filter( ‘rp4wp_thumbnail_size’, ‘rp4wp_example_my_thumbnail_size’ );
 * Thanks

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Thumbnail posts same size?’ is closed to new replies.

 * ![](https://ps.w.org/related-posts-for-wp/assets/icon-256x256.png?rev=970117)
 * [Related Posts for WordPress](https://wordpress.org/plugins/related-posts-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/related-posts-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/related-posts-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/related-posts-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/related-posts-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/related-posts-for-wp/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [dviolante](https://wordpress.org/support/users/dviolante/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/thumbnail-posts-same-size/#post-12830898)
 * Status: resolved