Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To use an image already in WordPress as a post’s featured image, open the post, choose the image in the editor’s Featured image control using the Media Library tab, confirm with Set featured image, then save or update the post. This assigns the image to the post; it is separate from inserting the image into the post body.

Set a featured image from the Media Library

  1. Open the post for editing. Go to the post you want to change in the WordPress editor.
  2. Open the Featured image control. It is commonly in the editor sidebar; its position and wording can vary by editor, WordPress version, theme, and post type.
  3. Choose the existing image. In the image-selection dialog, open the Media Library tab, select the attachment you want, and confirm with Set featured image.
  4. Save the change. Select Update for a published post or the appropriate save control for a draft.
  5. Verify the assignment. Reopen the post or check its editor panel or preview to confirm the selected image is shown as the featured image.

The Media Library lets you choose items uploaded previously. The Classic Editor documentation describes selecting an item from that library, while the Theme Handbook explains that featured-image controls appear on appropriate editing screens when support is enabled: WordPress: Using Images and WordPress Theme Handbook: Post Thumbnails.

A featured image is not the same as an image in the post

Adding an image to the body of a post and assigning an attachment as its featured image are separate actions. Selecting or inserting a Media Library image in the content does not automatically set it as the post thumbnail. Use the Featured image control to make that post-level assignment. WordPress’s developer reference describes the relevant function as setting the post thumbnail for a given post: set_post_thumbnail().

If the Featured image control is missing

  • Look for hidden editor panels. Depending on the editing screen, the control may be hidden among available panels or under screen options.
  • Check theme support. The active theme must support post thumbnails, and that support must apply to the post type you are editing. The Theme Handbook documents add_theme_support( 'post-thumbnails' ) and support for selected post types: Post Thumbnails.
  • Separate assignment from display. If the image is selected in the editor but does not appear on the public page, the assignment may still be saved. The theme’s templates determine whether and how the featured image is rendered, including the image size used.

Set an existing attachment in PHP

For code that reuses an image already in the Media Library, pass the post ID and the attachment ID to WordPress:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
set_post_thumbnail( $post_id, $attachment_id );

The official reference documents the signature as set_post_thumbnail( int|WP_Post $post, int $thumbnail_id ). The attachment must be a usable image: WordPress checks that it can return an image through wp_get_attachment_image(). The function’s return value is an integer or boolean; a false result can mean failure, but can also mean the same value was already stored, so it does not by itself prove that a different image was assigned. See the function reference.

If code must create an attachment from a file, that is a separate workflow: create the attachment, then assign its ID as the post thumbnail. For an image that is already a Media Library attachment, creating another attachment is unnecessary. WordPress documents attachment creation in wp_insert_attachment().

Quick Recap

SaleBestseller No. 2
SaleBestseller No. 3
SaleBestseller No. 4
1,000 Books to Read Before You Die: A Life-Changing List
1,000 Books to Read Before You Die: A Life-Changing List
Book - 1, 000 books to read before you die: a life-changing list (1000 before you die); Language: english
$19.37
Bestseller No. 5
Teacher Record Book
Teacher Record Book
Keep track of everything from attendance to test scores; Spiral bound; Measures 8-1/2" x 11"
$4.89
Best Value
Teacher Record Book
  • Keep track of everything from attendance to test scores
  • Spiral bound
  • Measures 8-1/2" x 11"
Rank #4
Sale
1,000 Books to Read Before You Die: A Life-Changing List
  • Book - 1, 000 books to read before you die: a life-changing list (1000 before you die)
  • Language: english
  • Binding: hardcover

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi