I too am a little late joining the conversation but maybe you are still following the thread. My opinion is:
EMPOWER yourself!!!!
You are now aware these things WILL happen. You have no reason to be impolite, afraid, or insulted. YOU are happy with your husband and marriage and, I assume, he is equally happy with the new you. SO, if it were me, I would respond with something like "Thanks! My husband thinks so too! I'll let him know you said so!" Or "Thank you! I try to look my best for my husband. He is such a great guy!" Anyway, in doing so you accept the compliment and put up a boundary. If he approaches again after that you have every right in the world to quickly put him in his place, rude or not! But you need to accept that beautiful women are admired by both men and women openly these days and you have the right to decide who and how much attention you are willing to have that from. Just like with losing the weight it is in our control to decide "who, what, when, where, how much" (isn't that similar to a line Julie Roberts said in Pretty Woman?) so, make the decision of what you want. If you want a firm wall, there really is not problem saying to someone "thank you for the compliment however, I am married and these things make me feel a little ackward. I hope you won't be hurt by my asking you to avoid sharing with me in the future." I know it is hardlined and rude but if it makes you feel better and in control. It hurts nothing. You are after all not shopping for a beau!
In case you are wondering, I grew up with more attention than I knew what to do with. I had attention as a 13 year old from men in their 20's and 30's. I have had more than 2 dozen married men asking me outwardly to have affairs (some of them I knew their wives). I couldn't walk down a street without being ogled. My breast (size 32dd at age 12. I had a 19 inch waist and 35" hips) were always the first thing seen. I feel like a freak even though I was supposedly "beautiful". I ended up being physically attack/molested, and raped, and stalked. FOR ME, My body was nothing helpful and was making me a target. Fear was a great reason to destroy it and food was a perfect weapon. The thing was, the attention was still there even when I was fat, not as much but still there and still rude. SO, I did go through therapy. It helps. The attention is about them in many ways and not about me. I have to decide for myself what I am ok with, where my boundaries are, and how someone is allowed to address and speak with/to me. I am the smallest now that I have been in almost 15 years and, again, the attention is ramping up. Now, I have been being grateful. I shrouded myself in fat, disrespected who I was, and made myself unpowerful. I hid for nearly 2 decades because I didn't know how to handle attention and, I gave up some moments and memories I can never get back. For me, this attention with my new understanding of how to address it is like receiving a small medal for all the hard work I did to get here to today.
If someone is blantly rude, I can be rude back.
If someone is polite but there attention is unwanted, I can politely say so.
If someone is making a flirtatious comment, I can call them on it - jokingly ( I know you say that to all the ladies. My husband warned me about men like you! or OMG!! Too funny, my husband is going to love that line! Can't wait to tell him about this.) OR outright tell them, I'm not available.
IT IS OK TO NOT BE AVAILABLE!! You don't have to say thank you, which might be an invitation for more attention. very simply smile and say something dismissive like "your the 3rd person today to say that. and smile brightly"
Anyway, plan ahead. Discuss this new issue with your husband and your fears if your relationship is so open. If not, do like the first commenter and use the compliments to reinforce your relationship. Tell him "someone today let me know they think you have a lovely wife." But pass the compliment to him either for his good choice or because he is an equally attractive man.
Good luck!