This photos shows how absurd the world is getting. Religion has to bend over the law, not the other way around. It the law says "no hat", it should be no hat, and fuck religious zealots that want to have their hat of the photo.
If sate laws and your religion laws are incompatible, then forget about your religion laws, they just don't apply.There are many religions - all of them incompatible, and pretty irrational to say the least -, whereas there is only one state law at a given place, and in many decent countries it gets decided by collective discussion. So the state law always applies while the religious laws are just a pile of bullshit.
Sadly, people that are not OK with that are bombing Paris, and our response is to make more space for religious bullshit. At some point, it has to be enough. Religions have to get the fuck off politics. You are free to believe whatever bullshit you want, to do whatever fucking dumb rituals you like, but it has to have no impact whatsoever on society. Simple, reasonable, and safe for everybody.