Because you were posting a picture of yourself with a guy, I thought you have a boyfriend.
ご質問ありがとうございます。
"Because you were posting a picture of yourself with a guy"=「男と一緒に映っている写真を君が投稿していたから」
"I thought you have a boyfriend."=「君に彼氏がいるのかと思った。」
あるいは、"The picture of you with a guy that you had posted made me think that you have a boyfriend."
ご参考に!