I disagree. I say run, leave that country. I once did the same. Why would he like to live in a country governed by religion to the point that a secular photo gets you to jail?
Run, start your life somewhere else. That is my advise.
A lot of countries have dogmatic laws many people in them disagree with. For instance, in the US, you can go to jail for selling cannabis, and a lot of people disagree with that.
If an American friend told you he was about to go to jail for a year for selling drugs, and you felt it was unfair, would you tell him to flee?
As such, you can comply with unfair laws, or not and take the consequences, or go somewhere with different laws. Separately, you might campaign to change them, but while those laws are in place the above choices are all you have. Which you do is really a cost benefit thing.
>If an American friend told you he was about to go to jail for a year for selling drugs, and you felt it was unfair, would you tell him to flee?
For a year? I'd tell him to stay. For 4-5 years, or 10-15? Run if you can come up with any way to. This particular case also revolves around religious freedom, so it may be possible to get refugee status somewhere, esp. being high-skilled and entrepreneurial.
Run, start your life somewhere else. That is my advise.