how to get the list of images that are not yet used in a post (featured image)
christophebe opened this issue · 2 comments
christophebe commented
Hello,
I would like to fetch the list of images that are not yet used as featured images.
Is it possible to do this kind of queries ?
Thanks
Christophe
christophebe commented
Hello,
Is it not possible to get it ?
Thanks
kadamwhite commented
Hey @christophebe ! There's no way to do that query directly via the API, you'd need to write some custom PHP query logic on your site. You could then expose that as a filter parameter on the media endpoints, but the ability to search through posts and identify which images haven't been featured yet is a pretty expensive query that can't be accomplished without custom code on the WP end.
Hope this helps!