So, the first thing to do is not to be alarmed by whatever it is they are telling you.
The second thing is to have a bit of compassion and think about how sad or unhappy this young person must be and then to calmly suggest courses of action you can take.
I think you should ask them questions; ascertain how they ended up in this circumstance, how they got to taking pictures of themselves and how these pictures ended up in someone else’s hands.
But I think it’s equally important to let them know that it’s not the end of the road; perhaps there ought to be changes in the way teachers respond to this.
You have to ascertain why they have been involved and which course of action you will take. But in all instances, you need to make sure that there is somebody else that they can talk to who is maybe outside of the teaching framework and that relationship.
They should be able to talk about how they’re feeling and given some coping strategies.