From wp-admin i.e from Dashboard
Media -> Library
and then change the view option to List view instead of Grid view
and then mouse hover the image ‘edit’ button.
we can notice at the bottom left corner the edit link url display
from that link we can identify the image ID.
for post attribute the image id is assigned. “post=” some number will return, that number only image id.
or just click on that link,
in the url bar, we can notice the post ID.