Picture-1.png attached/linked to “New Tech Site Could Beat Them All?”, but it shown in “Fairly Long Title To See If Share Buttons Move Move Move”.
This mean your images have been uploaded, but not attached/linked to the post that you want to show.
So, you must get information of IMG tag in each post, not attached/linked image.
Try this:
query_posts('showposts=5'); // recent 5 posts
while(have_posts()) :
the_post();
?><div class="my-post"><?php
global $post;
if(preg_match_all('@wp-image-([0-9]+)@i', $post->post_content, $ids)){
foreach($ids[1] as $id){
echo wp_get_attachment_image($id, array(50/* width */,20 /* height */), false, array('class' => 'my-image'));
// break; // if this loop breaks, only one image is shown
}
}
echo '<a href="' . get_permalink() . '">' . get_the_title() . '</a>';
?></div><?php
endwhile;
wp_reset_query();