My stance on this matter would depend on several details of the case I don't know about. But concentrating on what has been said in here, three remarks:
1. If it's true that the cartoon of Muhammad wearing a bomb as traditional headdress was shown, this is not just about some random portrayal of the prophet. That cartoon is an (anti-Islamic) political statement on current day affairs. Using such imagery means intermixing questions of secularism and 'free speech' with popular xenophobic stereotypes about Muslims.
So if that teacher had wanted to discuss religious taboos and public speech, but not xenophobia against Muslims (which I ultimately don't know), he has undermined his own project. If he didn't understand that cartoons like that make it not just a question of secularism, but of xenophobia, it shows ignorance.
2. This is not about some random expression of speech in a random public space, this is about teaching at a public school. Different rules apply. One of the elementary duties of a teacher is to create an environment for discussion everybody can participate in. This may well mean that the teacher has to hold back on things he wants to challenge. If you know that a particular approach will alienate part of your class upfront, you don't insist on your 'right to offend' and pull through. You try to find a better approach.
3. All of this said, the teacher surely doesn't deserve the public scandal coming at him in the slightest. All the more so if he has been threatened, as reports say. This issue should mainly be resolved between school, students, and parents, but it's already been blown out of any reasonable proportion, and it will inevitably get exploited further from both right wing and Islamist demagogues.