Mirror Image and shield combo

On the topic of mirror image and shield combo, lets say a creature successfully attacks the real one and then the defender decides to use shield as a reaction, which comes first and which has priority?