Education chiefs called in Police Scotland officers following the incident at the school last Wednesday.
Furious teachers claim claim management did not inform them of the situation and took nearly a week to warn them to switch off a sharing function on all devices while on school premises.
They also insist that the 13-year-old pupils accused of staging the stunt tried to stir up trouble for the male English teacher and were only thwarted when classmates spoke up and identified them as being responsible for the appearance of the shocking image, which is understood to have appeared on a number of other devices nearby.
Police Scotland confirmed both S2 pupils have been charged over an ‘indecent communication’.
The incident unfolded while the teacher was in a corridor outside a classroom where had earlier sent an unruly pupil.
As he spoke to the boy the indecent image was sent via AirDrop to his tablet. One of the pupils now charged is accused of sneaking behind his desk and hitting ‘accept’ on the device and displaying it on the large screen.
The teacher re-entered the classroom and was confronted by the image which was subsequently removed from display and other pupils then came forward to identify who was responsible.
However, staff feel the incident was ‘very poorly’ handled by the management team who waited until Monday to issue guidance about disabling AirDrop on their devices without revealing why.
One teacher said: “A male colleague was teaching a class and was having to deal with poor behaviour. Normal practice at the school is to send the pupil into the corridor for a short period and then go out to speak to the pupil to attempt to encourage them to improve their behaviour.
"This was what happened on this occasion, however while the teacher was outside another pupil inside the class used AirDrop to send an image of child pornography to the teacher's iPad, yet another pupil went behind the teacher's desk and accepted the file which was then displayed on the projector to the whole class.“The teacher was horrified to see this on his return to the class, immediately removed the image and an investigation was launched. We were told that some of the class were accusing him of being a paedophile.“Fortunately for the teacher other pupils came forward to confirm that it was two of their classmates who had been responsible.”
They continued: “This incident has horrific implications for anyone in the teaching profession, nothing could be worse than being accused of paedophilia and there has been a wholly inadequate response by the leadership team who handled it very poorly.
"The incident happened last Wednesday but there has been no information passed onto the teaching staff to make us aware of what happened, other than a vague email on Monday almost a week later, telling us to turn off AirDrop.”
Claiming that neither of the boys had been excluded from classes, they added: “Moral amongst staff is incredibly low, behaviour in the school is at an all time low, a number of persistent offenders continue to disrupt learning without significant sanction. Many of us are looking to get out of the profession we love as we simply cannot continue to be subjected to the current levels of daily abuse.”
An Edinburgh City Council spokesperson said: “The safety and welfare of all pupils in our schools is paramount. The school took immediate action following this isolated incident last week and supports have been put in place for any young people or staff affected.
"The pupils’ parents/carers were personally contacted by the head teacher to inform them of what happened and the support available for their children. Due to the seriousness of this incident Police Scotland were informed and are carrying out enquiries.”
A Police Scotland spokesperson said: “Two boys, both aged 13, have been charged following a report of an indecent communication that took place at a school in Edinburgh on Wednesday, 16 March. A report has been sent to the Youth Justice Department.