Title: Set post thumbnail automatically!
Last modified: August 19, 2016

---

# Set post thumbnail automatically!

 *  [pedrogomes](https://wordpress.org/support/users/pedrogomes/)
 * (@pedrogomes)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/set-post-thumbnail-automatically/)
 * I have a upload form where users can upload images and after that I’ll create
   a post with the tile, description and the respective image! I can do this now
   using wp_insert_attachment! But now I would like to set automatically (using 
   php code) the post thumbnail without having to do it on backend! The post thumbnail
   will be the image uploaded! Is there any way to do that?
 * Thanks!

The topic ‘Set post thumbnail automatically!’ is closed to new replies.

## Tags

 * [automatic](https://wordpress.org/support/topic-tag/automatic/)

 * 0 replies
 * 1 participant
 * Last reply from: [pedrogomes](https://wordpress.org/support/users/pedrogomes/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/set-post-thumbnail-automatically/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
