Problems with laws like this
There is no defence. It's just do you have picture? Yes, guilty. Of course if your important they can decide that it's not in the public interest to proceed with charges.
I expect they were told that if they didn't plead guilty they were going to jail.
I expect they were doing something the cops didn't like, maybe taking part in a protest, or worse taking photos of cops breaking up a protest. Now they have nice two year conditional discharge so they better not do anything else important people don't like for the next while. It would be interesting to know what the unrelated matters were.