A middle school teacher in Long Island, New York, was fired from her job after a topless photo she sent to a former boyfriend in 2016 was leaked to students, news outlets reported.

>> Read more trending news

Lauren Miranda, 25, said she had no idea how the photo got into the hands of students.

"That picture was never posted," Miranda said, according to WPIX-TV. "How it got out is the million dollar question."

Lauren said she took the photo and sent it to her boyfriend at the time, who was also a teacher in the South Country School District in Bellport, but that at no time was it ever posted online.

Miranda said when school officials found out about the photo, they first put her on administrative leave for three months in January, then fired her from her teaching position of four years last week.

Her attorney, John Ray, told WABC-TV that the school district is discriminating against Miranda for being a woman.

"Anytime a man has ever exposed his chest, no one has ever commented or had any problem with it whatsoever," he said. "But when a woman displays her chest, as happened here, she gets fired from her job."

Miranda has filed a $3 million lawsuit against the district.