Categories image on product page

Hi i am looking for a way to get the category image to display on the product page. using the following code i am able to get the category to show up, but not the image…



{math assign=“get_category” equation=“x-2” x=$breadcrumbs|@count}

{$breadcrumbs.$get_category.title}





I know this looks at the breadcrumbs so not to do with the category images, but any ideas would be great.



With regards to there being more than 1 category, i want the image to display the selected breadcrumb category.



Thanks

Andy

I have found this bit of code and its in the site now and it comes up with a 'no image available' box… any idea what i need to tweak so it finds the right category image?



heres the code…



{include file="common_templates/image.tpl" show_detailed_link=true images=$category_data.main_pair object_type="category" no_ids=true class="cm-thumbnails"}