<?php if ( is_category() ) { ?><img src="/path/to/images/<?php echo $wp_query->get_queried_object_id(); ?>.gif" alt="" /><?php } ?>