Chris Keates, general secretary of the NASUWT, said staff across England have reported troublesome children seeking hits on YouTube by secretly recording a riled teacher.
Others have used their mobile phones to take inappropriate "upskirt" or "downblouse" images of their teachers, or grafting their heads on to pornographic images and posting them online.
In some cases, teachers have received death threats, sent by pupils, while others have been targeted on Facebook.
Speaking at the annual NASUWT conference in Birmingham, Ms Keates said: "We've even had cases where pupils have staged an incident in the classroom, videoed it, and then put the video up on to YouTube which shows the teacher either being put under pressure or being given the runaround by pupils, to try and get the teacher to react in some way so that it would make a good video on YouTube.
Sunderland at Wembley: London pub landlord thanks SAFC fans for ‘bumper weekend’ after League play-off final victory over Wycombe Wanderers
Two people taken to hospital after crash on A1231 Sunderland Highway
NIKKI ALLAN: Man accused of murder of Sunderland schoolgirl in 1992 set to face trial
Serial Sunderland road menace with 63 offences drove in faulty BMW with smashed windows to escape police
Three men arrested after motorcycle theft in Sunderland
"You might get a situation which seems quite low level, where the pupil starts to answer the teacher back, they might have a piece of equipment in the classroom that they suddenly start to pass around which can get the teacher quite irritated.
"But what the person watching the film doesn't see is what the pupils are doing, they've just got a picture of a teacher getting irritated."
Ms Keates said the presence of mobile phones in the classroom has had a marked impact on teachers' private lives.
She said: "We've had teachers who have said they have stopped using social media themselves, they don't want to look on social media and perhaps find comments about themselves because they don't think they will go back into the classroom again, some have said they felt humiliated in front of pupils and it's adding to the anxiety and pressure that goes with the job anyway."
Ms Keates said some schools have clear policies on mobile phone use in school, insisting that devices are locked away and used only once lessons have finished for the day.
But she said others are more lax.
Ms Keates said: "If some schools can do it, why can't all? That would make sure at least one of these pressures that teachers are facing in the job is actually removed from the classroom."