Kim Kardashian has said she felt “insecure” when she was pregnant because of comments made about her weight on social media and in magazines.

She reflected on her own experiences of being in the media spotlight after watching Framing Britney Spears, a recent New York Times documentary about the pop star’s public unravelling in 2007.

Reality TV star Kardashian said she felt “a lot of empathy” for Spears after watching the documentary.

MTV Video Music Awards 2016 – Arrivals – New York
Britney Spears has recently featured in a high-profile documentary (PA)

“No matter how public someone’s life may seem, no one deserves to be treated with such cruelty or judgment for entertainment,” she wrote on Instagram.

“Looking back at my own experiences, I remember a time when I felt this way.”

Kardashian said she suffered with pre-eclampsia while she was pregnant with daughter North, which made her “swell uncontrollably”.

She said: “I gained 60 lbs and delivered almost six weeks early and I cried every single day over what was happening to my body, mainly from the pressures of being constantly compared to what society considered a healthy pregnant person should look like – as well as being compared to Shamu the whale by the media.

“Looking at all of the photos of myself online and in magazines made me so insecure and I had this fear of wondering if I would ever get my pre-baby body back.

The Metropolitan Museum of Art Costume Institute Benefit Gala – New York
Kim Kardashian (Aurore Marechal/PA)

“I was shamed on a weekly basis with cover stories that made my insecurities so painful I couldn’t leave the house for months after.

“It really broke me.”

Kardashian shared the message alongside a number of photos of magazine covers and social media posts which highlighted her weight gain.

“Luckily I was able to take these frustrating, embarrassing feelings and channel it into motivation to get me where I am today, but to say this didn’t take a toll on me mentally would be a lie,” Kardashian said.

“You just never fully know what someone is going through behind the scenes and I’ve learned through my own experiences that it’s always better to lead with kindness.”