Should I mention it if someone looks like they lost weight?

Ok so I have been skinny my whole life so I'm not sure how to go about this type of thing. I occasionally notice when a friend or family member looks like they lost weight. Do I compliment them or not say anything? I don't want to come across as insulting and don't want to act like they looked bad before or something. I'm asking because sometimes I won't mention it and then they will end up bringing it up themselves like "I've been trying to lose weight" etc like they were hoping that I noticed. When I was pregnant I gained about 30lbs and was back at pre pregnancy weight a month later and I did like it when people told me I looked skinny/great, but I'm not sure if it's the same thing. Thanks for any advicel