One lucky couple got a huge surprise when actor Tom Hanks crashed their wedding photos.

Their photographer, Meg Miller, was on-hand to capture the moment as Hanks surprised the unsuspecting pair while they posed for pictures in New York City's Central Park.

"Yesterday's wedding was so beautiful! Elisabeth and Ryan you planned one amazing celebration," Miller wrote on Instagram. "The icing on the cake was @tomhanks stopping in Central Park to wish them congratulations."

Hanks also shared a photo of his own with the couple on his Instagram account.

"Elizabeth and Ryan! Congrats and blessings!" he captioned the selfie.