Vindictive or something else?

My ex boyfriend I dated for over a year decided to go backpacking for three weeks overseas. He posts a picture online of him hanging out with girls one night (knowing I would see the picture) and then the next day decides to message me directly saying he has been thinking about me...I've decided to block him, but how the heck does he see that this is something that is ok? Did I make the right decision or should I have talked to him about it?