According to testimonies, the soldiers ordered all the men to undress, gathered them in one place, and took the photos that were later disseminated on social media (senior Israeli officials have since chided the soldiers for sharing the images).
It’s very telling that the officials only have a problem with the evidence of their war crimes.