This is a HUGE dysfunction in WP... I've been trying to get the thumbnail from the first image in my post which is not attached to this post because it has already been uploaded (therefore attached) to a previous post and I simply can't.
This means I have a 'books' category and when I insert the 'book_new.jpg' image to my posts, the image is showing in the post of course but since it's not attached to it, I can't get the thumbnail and so I can't show the thumbnail on my homepage... (any function like wp_get_attachment_image would work since the image MUST be attached to the post...).
Totally weird, a real dysfunction obviously. WordPress is amazing, really but when you use it as a CMS, not having the ability to re-use already attached images into other posts and show the thumbnail is beyond understanding.
I've read on WP.com:
If you’d like to use the attached image with another post, please try uploading it again directly from the Media Library. Please note that the newly uploaded image’s URL will be different.
I can't imagine uploading the same image multiple times, each time I want to show a thumbnail!!
I'm not the only one pointing out this problem. It would be so great if a solution was available!