Show thumbnail for category?

There’s a great plugin called Taxonomy Images. It lets you set one image per category that you can then access in all sorts of ways.

It’s a little funky in that it uses some custom filters to return the images, but the documentation is pretty good and you should be able to figure it out.

== UPDATE ==
Here’s a quick example that gets the image based on ID (I’m assuming you’ll have the $category object that you already have in your snippet:

$images = get_option('taxonomy_image_plugin');
$cat_id = $category->term_taxonomy_id;
if( array_key_exists( $cat_id, $images ) ) {
    echo wp_get_attachment_image( $images[$cat_id] );
}

Here’s a slightly expanded version of that code on the support forums.

error code: 523