That sounds like something that could knock your confidence in your own body. Make sure it doesn't. Know and remember how good you do look, maintain your body and don't try to change it because of him or others, when you are actually happy with it.
Understandably, a guy might like or be able to appreciate other girls bodies, but these other girls are not there in the flesh in front of him, you are.
Ofc, usually it is common sense to be able to differentiate between a real and fake body but maybe your bf needs a talk so it's clear to him? If he cannot appreciate you, and realise the value of what he's got, he's missing out on real stuff. His loss, not yours.
A lot of people in relationships have a prefereance related to appearance and if they have a preferance in everything likely the partner will not meet all of them. That is normal. That is something the person themselves has to learn to deal with and overlook, the other partner doesn't need to try to change themselves to fit that. Ofc, if the reasoning behind it was also due to their health etc (being obese) then is something the partner should work on primarily for themselves and their health, with an added bonus of pleasing their partner.
In your case, I would probably outline the thing I mentioned in this post to my partner, and if I found that he kept knocking down my confidence, explain exactly where and why to him, and if he continued with that, I'd take time to reflect on the rest of the relationship, and if I could live with this and overlook this particular issue or not. It may be that you learn not to pay attention to this particular issue because everything else is amazing or good enough, and likewise you think for him too.
Don't just look at this particular issue on its own, do that and look at the whole picture too. We only know what you tell us in OP, we don't know how the rest of your relationship is. Ofc, rn this issue is bothering you so it does need to be dealt with first. And learn not to take issue from what others say regarding you and your body.