I'm generating a query for certain posts in 'Trash'. I can retrieve the featured image URL, but I'm looking for a way to get the featured image file location on the server.
# generate the query
foreach ( $query as $post ) {
$thumbID = get_post_thumbnail_id( $post->ID );
$thumbObj = get_post( $thumbID );
$source_url = $thumbObj->guid;
# how do I get the string "/path/to/wordpress/media/library/thumbnail.jpg" ?
}
I can't find any WordPress function that returns the actual featured image file location.