Once you know their joke is being used as a medium to make you feel inferior about yourself you already have insight into why they are doing what they are doing.
You can clearly ask them to make better jokes which aren't disrespectful in nature. If they still continue with it then you have two options
1) Distancing yourself from them if that's not possible then second option might work-
2) Whenever they say something demeaning "jokingly" you can give a sarcastic reply like "wow you are so funny" or just play along and crack a similar joke on them to give them a taste of their own medicine because sometimes people need that. It will make them realise that you are not going to out up with the demeaning behaviour.