I'm using wp_insert_post and media_sideload_image to create a post and attach a single image to the post. However, how can I mark this attached image as featured thumbnail? It would make listing the thumbnails significantly faster by using the_post_thumbnail instead of looping through each post manually showing the first image.
How can I mark the attached image as featured thumbnail?
Thanks, Dennis