what to do?

So my bf has an ex he's still friends with who is really disrespectful to me and when I say anything he yells and defends her. he tells her alot of personal things I prefer he didn't and she uses it against me. another problem is all she talks about is how much she loved him then sends him pictures of herself nothing dirty yet except one time she sent a picture of herself in booty shorts. I'm not sure what to do because he puts her before me and defends her over me I can't say or show him anything she did wrong he gets too defensive. he did say he will stop talking to her but he said that before and they kept talking and sneaking around to hang out. this last time when I asked him to stop being friends with her he flipped out yelled and said I can't pick his friends. just at a loss am I in the wrong or is he?