The image is of friends sitting around a table, chatting. Below their lines of sight are their wine glasses, so they are, each of them, chatting over a glass of wine.
Over a [beverage] is a set phrase (you should not try to rephrase it) in English that means while drinking a [beverage]. Having the [beverage] in the singular, even though more than one person may be involved is usually how the phrase is used. "I like to read my morning paper over a cup of coffee," is the same set phrase used about a single person.