Have you asked him point-blank why he is looking at these pics? I mean, if they're friends of his, why is it bothersome? I look through my friends' pics all the time--I can't be held responsible for their content. Is it his fault that girls/women these days feel the need to constantly take sexually explicit selfies and post them? As a guy, he's going to want to look at them, regardless of whether or not they're friends. I mean, is he lingering over them? How do you know about this anyway?
Maybe he's testing himself? For a male, the loss of the libido is humiliating and terrifying, and the resulting performance anxiety can be completely paralyzing. I can promise you that the hurt and anger I demonstrated also served to exacerbate the problem in our situation. My bf said he was afraid to even try anymore because he couldn't stand to see what it was doing to me.