Taylor Swift has opened up about her battle with an eating disorder.

The 30-year-old singer has admitted she used to ''just stop eating'' if she saw a photo of herself where she felt she looked too big or if someone made a cruel comment about her size.

Speaking in her Netflix documentary 'Miss Americana', she said: ''It's not good for me to see pictures of myself every day...

''It's only happened a few times, and I'm not in any way proud of it. [There have been times when I've seen] a picture of me where I feel like I looked like my tummy was too big, or... someone said that I looked pregnant ... and that'll just trigger me to just starve a little bit -- just stop eating.''

In the documentary, then-and-now photos show how thin the 'Me!' singer was during her '1989' album era contrasted with the slim but healthier look she presented while touring 'Reputation' in 2018 and Taylor admitted she regularly felt like she was ''going to pass out'' while on stage at her thinnest because of her under eating.

She said: ''I thought that I was supposed to feel like I was going to pass out at the end of a show, or in the middle of it. Now I realise, no, if you eat food, have energy, get stronger, you can do all these shows and not feel (enervated).''

And the 'Look What You Made Me Do' hitmaker was always ready to defend concerned comments about her diet.

She admitted her response to concern was: ''What are you talking about? Of course I eat. .... I exercise a lot.' And I did exercise a lot. But I wasn't eating.''

These days, Taylor doesn't care as much if someone comments on her weight gain and has accepted ''the fact that I'm a size 6 instead of a size double-zero.''

The blonde beauty admitted her relationship with food was centred around a cycle of ''praise and punishment''.

She told Variety: ''My relationship with food was exactly the same psychology that I applied to everything else in my life: If I was given a pat on the head, I registered that as good. If I was given a punishment, I registered that as bad.

''I remember how, when I was 18, that was the first time I was on the cover of a magazine. And the headline was like 'Pregnant at 18?' And it was because I had worn something that made my lower stomach look not flat. So I just registered that as a punishment.

''And then I'd walk into a photo shoot and be in the dressing room and somebody who worked at a magazine would say, 'Oh, wow, this is so amazing that you can fit into the sample sizes. Usually we have to make alterations to the dresses, but we can take them right off the runway and put them on you!' And I looked at that as a pat on the head.

''You register that enough times, and you just start to accommodate everything towards praise and punishment, including your own body.''

But the 'Trouble' singer admitted she feels ''uncomfortable'' talking about the subject.

She said: ''I think I've never really wanted to talk about that before, and I'm pretty uncomfortable talking about it now. But in the context of every other thing that I was doing or not doing in my life, I think it makes sense [to have it in the film].''