Title: Same image in the thumbnails
Last modified: October 21, 2018

---

# Same image in the thumbnails

 *  Resolved [hwuser](https://wordpress.org/support/users/hwuser/)
 * (@hwuser)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/same-image-in-the-thumbnails/)
 * Hello, for the cover image I use this plugin since I use external images from
   a url:
    [https://es.wordpress.org/plugins/featured-image-from-url/](https://es.wordpress.org/plugins/featured-image-from-url/)
 * The problem is that I take the cover image of the post and it is the one that
   puts in all the images of the related posts of the thumbnails.
    Do you know what
   can happen or how to solve it?
 * Thank you!!!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsame-image-in-the-thumbnails%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/same-image-in-the-thumbnails/#post-10800680)
 * Hi hwuser
 * Try it with this in your (child) theme’s functions.php file:
 *     ```
       add_filter( 'related_posts_by_taxonomy_post_thumbnail_link', 'rpbt_related_post_fallback_image', 10, 4 );
   
       function rpbt_related_post_fallback_image( $image, $attr, $related, $args ) {
          	$featured = get_the_post_thumbnail( $related, $args['size'], $attr['describedby'] );
   
           return "<a href='{$attr['permalink']}'>{$image}</a>";
       }
       ```
   
 * btw:
    consider creating a [child theme](https://developer.wordpress.org/themes/advanced-topics/child-themes/)
   instead of editing your theme directly – if you upgrade the theme all your modifications
   will be lost. Or [create a plugin](https://wordpress.org/plugins/pluginception/)
   with the code above.
    -  This reply was modified 7 years, 7 months ago by [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/).
 *  Thread Starter [hwuser](https://wordpress.org/support/users/hwuser/)
 * (@hwuser)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/same-image-in-the-thumbnails/#post-10801614)
 * Hello, many thanks for your quick reply. But the code does not do anything. The
   same image keeps appearing in all the related posts…
 *  Plugin Author [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/same-image-in-the-thumbnails/#post-10801638)
 * Oh, I see now that code indeed does nothing 🙂
 * Try it with this
 *     ```
       add_filter( 'related_posts_by_taxonomy_post_thumbnail_link', 'rpbt_related_post_fallback_image', 10, 4 );
   
       function rpbt_related_post_fallback_image( $image, $attr, $related, $args ) {
          	$featured = get_the_post_thumbnail( $related, $args['size'], $attr['describedby'] );
   
           return "<a href='{$attr['permalink']}'>{$featured}</a>";
       }
       ```
   
 * I think the reason the post thumbnails are all the same is because the featured
   image from url plugin filters the WordPress post thumbnail output. My plugin (
   at this moment) doesn’t use the get_the_post_thumbnail() function to get the 
   post thumbnail image. I hope this makes sense.
 *  Thread Starter [hwuser](https://wordpress.org/support/users/hwuser/)
 * (@hwuser)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/same-image-in-the-thumbnails/#post-10801680)
 * Yeeeeeeees!!! Already works perfectly!!!!
    Thank you for the speed in finding
   a solution. Thank you very very much !!!!
 *  Plugin Author [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/same-image-in-the-thumbnails/#post-10802834)
 * You’re welcome 🙂

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

The topic ‘Same image in the thumbnails’ is closed to new replies.

 * ![](https://ps.w.org/related-posts-by-taxonomy/assets/icon.svg?rev=1115231)
 * [Related Posts by Taxonomy](https://wordpress.org/plugins/related-posts-by-taxonomy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/related-posts-by-taxonomy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/related-posts-by-taxonomy/)
 * [Active Topics](https://wordpress.org/support/plugin/related-posts-by-taxonomy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/related-posts-by-taxonomy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/related-posts-by-taxonomy/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/same-image-in-the-thumbnails/#post-10802834)
 * Status: resolved