Is there way of to grabbing "Image ID" or "Image File Name" after attaching a featured image (post-thumbnail) to page?
I am looking to capture that ID so that I can validate the image before posting the page.
I am using wp_insert_post_data for validation and unfortunately, it does not validate the newly attached images. If I had the ID, I can.
I am stumped on how to retrieve it and add it to input field. Any advice, much appreciated.