Is this cheating? More info in the rest of the question?

Is it cheating if I’m in a long term relationship and the relationship isn’t so great at the moment and I go on social media posting sexy pics and writing back to guys in my DMs? I did this after my boyfriend told me I am ugly (when he’s mad at me) and he told me to go talk to other guys. He literally told me to do these things and said he didn’t want to be with me and called me horrible names. We have good moments and more bad ones. He found out that I was writing back to these men and posting sexy pictures and was furious. I don’t do it anymore but he still brings it up and says I cheated on him.

Is this cheating? More info in the rest of the question?
Post Opinion