If an officer arrests you for breaking a bad law, that's not on the officer, that's on the legislators.
The UK it's a grey area. In theory it's fine unless the officer has reason to believe that the photos will be used to aid in an act of terrorism but that wiggle room could potentially be enough for an officer wishing to abuse their power.