It's true. They don't actually mean that. It's a joke. If they really thought you had an ugly husband they would remain silent OR tell you that you had a very handsome husband and then go and tell their friends all about it. British people just aren't that direct.
We are masters of the 'backhanded compliment', and between people who know each other well, this can be taken to baroque levels of backhandedness. Among friends, her husband being present, a wife may say, "I don't know why I stay with Jim: he's lousy in bed, he stinks, and he's as thick as two short planks!". Everybody will titter and look at Jim, who will smile fondly because he knows she means: "I love Jim dearly, he's an ace lover, his hygiene is impeccable, and he's easily the cleverest person in this room". He'll say, "Like, duh, I'd better take my monthly bath next week", and everybody will smile at the touching scene. It may seem baffling to outsiders, but, hey, that's just the way it is. UK. Love it or leave it!
Being included in this reversed-compliment thing, as the lady was who showed the photo, is a sign of friendly intent.