Clicky

  1. Home
  2. How To
  3. How to change related posts thumbnail size

How to change related posts thumbnail size

If you want to change related posts thumbnail size then first you need to create a Custom Plugin and add below the filter.

Example code:

add_filter('ampforwp_related_post_image_size','prefix_related_post');
function prefix_related_post($image_dimensions){
$image_dimensions['width'] = '300'; //Add your width which you need
$image_dimensions['height'] = '300'; //Add your height which you need
return $image_dimensions;
}

The Output of change-related posts thumbnail size

That’s it for this tutorial!

We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.

Ask your Questions Directly!
If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!
Updated on August 3, 2021

    Are you still looking for a solution?

    Then fill out the below form and we will reach out to you within a few hours.


    Was this article helpful?

    Related Articles

    Leave a Comment