Related Products Image

Many of my products have multiple images. When I select related products, I’d like to pick the image that should be displayed. For example, a brown shirt has a related hat in many colors. I want to show the brown image of the hat.