<human>: Throwaway, but I don't know what details to disguise as some of my friends are on Reddit. 

So, a couple of days ago, at a place I hang out, a friend(I'll call him "K") of mine decide to take out his phone, and tried to show us other friends a collection of really explicit female models' screenshots saved up. 
He was browsing through the gallery, and we stumbled upon some photographs of some female friends of mine. Mind that this was almost a soft porn folder with really NSFW lesbian pics, etc. The other thing I like to point out that the photos of the friends I saw aren't close to K, and are just casual acquaintances. Some of the female friends are the ones I consider very close to me, and consider them as my sisters. To be clear, I know they didn't send him the photos because they were the profile pictures saved from an Instant messaging app. And also, the friend group with my female friends and K is totally non-overlapping, so sending pics wouldn't have been a possibility. 

Do I tell my female friends and break the "bro code"? Or do I tell them about K, and ask them to change their privacy settings? Is it betraying K if I tell it all to my female friends(because I basically feel like shit, keeping it all by myself) 

An incident like this has happened before when K and his friends said some things about my friends to me, and I ratted it out to them. They got a know of it later and confronted me, and I had a sort of a guilty trip. I'm also quite non-confrontational. 

How do I resolve this situation without coming off as a jackass to my friends and also manage to "protect" my female friends?

Can you give me the gist of the text in a nutshell?
<bot>: Friend saved up some pics of some of my close female friends in an almost Porn folder. Need help to resolve this.