Target Group With Images

I have a target group in properties for product(EG, Female, Male ,Child) with images on product details page i want to display the images related to the property, i am getting the mediaID but i dont know how to display the image in frontend.