This thread discusses featured image flow through the media modal. There are some requests that the filter in the media modal remember the “uploaded to this post” filter setting independently for the featured image flow. Here’s an attempt at capturing this flow.
#gallery-22 {
margin: auto;
}
#gallery-22 .gallery-item {
float: left;
margin-top: 10px;
text-align: center;
width: 33%;
}
#gallery-22 img {
border: 2px solid #cfcfcf;
}
#gallery-22 .gallery-caption {
margin-left: 0;
}
/* see gallery_shortcode() in wp-includes/media.php */
- This is an old post. I’ve uploaded lots of images since this was published. A featured image is not set. Why do I want to set one now? A common scenario is that you have switched to a theme that requires featured images. Click Set featured image.
- By default, all media is shown. I usually want to set the featured image to an image already on the post. To find the images for this post in the all media view, I’d have to scroll pretty far back, scanning small thumbnails as I go. Luckily, there’s an uploaded to this post filter. Click Images.
- Click Uploaded to this post.
- There are the images I want.
“Uploaded to this post” requires that the image be attached to a post. Images uploaded through the media modal from the editor are attached to the post, but images uploaded directly to the media library are not attached and don’t get attached later when added to a post. We could use API for pulling images out of post content, like we do with some other media types.



