First of all, that’s extremely shitty that those people were so rude to you. Just ignore them; they’re petty and stupid.
I feel similarly about how I look in pictures, so I don’t really know what to tell you, except that your appearance ultimately isn’t as important as you think it is.
I could tell you to do research on photogenic poses and expressions, which might help, but I think what would really help you is to just accept the fact that everyone looks bad in photos sometimes and it really only matters that you are okay with what you see in the mirror. Everyone else’s opinion is entirely inconsequential.