A grapple attempt is an attack – a special melee attack:
When you want to grab a creature or wrestle with it, you can use the Attack action to make a special melee attack, a grapple. If you're able to make multiple attacks with the Attack action, this attack replaces one of them.
Because it's an attack, it can target an illusory duplicate from the mirror image spell:
Each time a creature targets you with an attack during the spell's duration, roll a d20 to determine whether the attack instead targets one of your duplicates.
What will happen if the grapple attempt targets a duplicate? Will it automatically be destroyed if I win the contest? What will happen if I lose the contest?
Best Answer
Nothing happens to the image. The grapple attempt just fails.
The pertinent mirror image rules:
And the grappling rules:
The grapple is an attack (specifically a "special melee attack") but not one that can hit. As such, it would have no effect on the mirror image - subjecting it to the Grappled condition does nothing.
That's further supported by the fact that you cannot either win or lose this contest, as the mirror image does not have a Strength (Athletics) or Dexterity (Acrobatics) check to contest against. By design, the only way to hit (and therefore dispel) the mirror image is to target AC.
For clarity, the chain of events would be as follows: You attempt to grapple a wizard who is currently under the effects of Mirror Image. You roll your Mirror Image check. If the roll is in your favor, then you correctly target the wizard, and the grapple attempt proceeds as normal. If it is not in your favor, you wind up targeting an image instead. The mirror image is unaffected by grapple, and therefore the grapple attempt autofails.
Further support for this position available in the answers to this question here.
Even more support can be found in this Sage Advice Compendium (page 11, right-hand colum)