title: Query to show images with recent posts in Wordpress sidebar/widget
body: <p>To show recent items from a Wordpress category in a widget I'm using this code...</p>
  
  <pre><code>&lt;ul&gt;
  &lt;?php $recent = new WP_Query("cat=1231&amp;showposts=5"); while($recent-&gt;have_posts()) : 
  $recent-&gt;the_post();?&gt;
  &lt;li&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark"&gt;
  &lt;?php the_title(); ?&gt;
  &lt;/a&gt;&lt;/li&gt;
  &lt;?php endwhile; ?&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>...but how can I make this query also display the first image in each post, and is there any way to set a 'default' image in case there is no image?</p>
  
  <p>Is there also a way to use thumbnails here, rather than loading the full size image and using HTML to resize?</p>