The statement used to come up frequently, but I haven't heard in in ages - well, in order to love others, you have to love yourself. Of course, I don't run in circles where such vacuities would be said (that is a salute to not only my online but my realspace friends) anymore.
It is less than half true. Like all dangerous thoughts, it contains enough truth to suck us in, so that "even the elect would be deceived." It's maybe 30% true. Those consumed with self-hatred cannot well-love others, yes. But it is mostly just an excuse for people to say "I'm going to work on loving myself for the next decade, then get back to you."
A better understanding is that it takes self-knowledge to love others.
I almost went down the trail of self-respect as a foundation for loving others, but that is merely closer, not the full effect. Self-respect is the true answer to those who advocate for self-esteem, which is not only an inadequate, but an actually destructive goal, as it depends entirely on others - or depends on self-delusion. That is a related question, but not quite the same.
If you run across that "love yourself first" doctrine, I am hopeful that the correction to "know thyself," if delivered gently, might be heard.