It's illegal to discriminate against someone on the basis of race and other protected classes. So by extension, it's best practice to avoid asking applicants for their race or asking them for a photo, lest you give the appearance that it's a factor in the hiring decision.
But I've never heard of rejecting someone outright for sending an unsolicited photo. That's just crazy. Would you also reject an applicant who had "President of African-American Student Union" on their resume because it belies their race?