I don't know of an actual idiom for this, but you might say the person who walked in front of the camera spoiled the shot or ruined the shot. Hope that helps!
If you have a question about the English language and would like to ask one of our many English teachers and language experts, please click the button below to let us know: