are you using the friendly urls? (ones that look like this: http://www.mysite.com.posts/2004/1/1/title_of_post_here)
I found that this can "break" image links unless the image has the full path.
If your images are in an image folder in the root, you might find this works...
<img src="/images/<?php the_category() ?>.gif" alt="<?php the_category() ?>">