Title: Post thumbnail issue
Last modified: August 24, 2016

---

# Post thumbnail issue

 *  [huntz](https://wordpress.org/support/users/huntz/)
 * (@huntz)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/post-thumbnail-issue-2/)
 * Hello,
 * I can see that in my uploads folder all the images I have uploaded into posts
   have the 4 different sizes.
 * I have no featured image set for posts but I want to get the thumbnail size to
   display on my front page.
 * I have tried putting the_post_thumbnail(); in the loop but nothing is displayed.
 * Am I missing something? Is there another way to grab a thumbnail size of an image
   that has been put inside of the post?
 * Currently I use a catch the image function to grab the first image in the post
   and display it on the front page with this code, can this be edited to get that
   thumbnail image?
 *     ```
       function catch_that_image() {
         		global $post, $posts;
         		$first_img = '';
         		ob_start();
         		ob_end_clean();
         		$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
         		$first_img = $matches [1] [0];
       		//$first_img = substr($first_img, 0, -4);  
   
         		if(empty($first_img)){ //Defines a default image
         			$first_img = bloginfo('template_directory');
           		$first_img .= "/images/default.png";
         		}
         		return $first_img;
       	}
       ```
   
 * Thanks

 The topic ‘Post thumbnail issue’ is closed to new replies.

## Tags

 * [image](https://wordpress.org/support/topic-tag/image/)
 * [image size](https://wordpress.org/support/topic-tag/image-size/)
 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [huntz](https://wordpress.org/support/users/huntz/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/post-thumbnail-issue-2/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
