Is hugging around the waist for photos appropriate?

Usually, for pictures, I hug around the shoulder, or waist for close friends. I saw a post saying that one shouldn't do that, however, IRL, usually they reciprocate. Should I stop doing it?