Why were anorexia rumors swirling around Sarah Hyland some years ago, and what was the real reason behind her tragic weight loss?

In 2017, the Modern Family star posted a photo to Instagram of her wearing her then boyfriend's clothing line. After that, she received an influx of comments regarding her weight, with some people saying "eat a burger" and others commenting about her head being bigger than her body.

In response, Sarah took to Twitter to explain her weight loss resulting from health issues that left her bedridden. The actress also revealed that she was taking a medication called prednisone that could be contributing to her dramatic weight loss. The actress said, "I've basically been on bed rest for the past few months, I've lost a lot of muscle mass."

Related: What Has Sarah Hyland Been Up To Since The End Of ‘Modern Family’?

Then she added, "I write this because I've been accused of promoting anorexia in, ironically enough, an anti-bullying post. And I want young girls to know that that's NOT my intention."

At that time, she kept private about exactly what was going on, saying, "Maybe one day I'll talk about it, but for now, I'd like my privacy."

Kidney Dysplasia

In 2012 she underwent a kidney transplant after battling kidney dysplasia and was unable to attend the 2017 SAG awards due to health reasons.

But she urged her fans not to be too concerned, writing, "There's no need to worry. I've been down before, and I'll probably be down again in my lifetime, but I'm steadfast and solid and will conquer my obstacles."

Sarah was told from a young age that she wouldn't be able to lead a normal life due to her kidney. As a devastating result of her deteriorating health back in 2012, the actress received a kidney transplant from her dad.

Unfortunately, this wasn't the end to her struggles as the medications she was put on made her weight uncontrollable, and she had to address the hate on her social media. Sarah even mentioned on Instagram that 2017 was a challenging year for her, but she continued to fight in hopes that 2018 would be a better year.

Anorexia Accusations

Sarah found herself in the middle of anorexia rumors on social media, and the Modern Family star wasn't having any of it. The actress has always been a slim girl, but that didn't stop some commenters online from accusing her of anorexia after it looked like she lost weight over the past few years.

It all started when Sarah posted a picture of her modeling ex-boyfriend Dominic Sherwood's clothing line, which ironically enough was to raise money for the Anti-Bullying Alliance.

Fans pointed out her thin legs and arms, and Sarah took it upon herself to set the record straight in a long note posted to Twitter. While she admits she lost weight, it wasn't because of an eating disorder but because of other health issues, she was experiencing at that time. As a consequence, she stopped working out and lost muscle mass.

Related: ‘Modern Family’ Helped Sarah Hyland’s Net Worth Reach $14 Million

Ultimately Sarah could just have gone on with her day and ignored those negative comments, but she wanted her followers to know that she wasn't promoting unhealthy habits.

According to People, she wrote, "My self-confidence is not rendered from your comments. Because I will always be too fat, I will always be too skinny. I will never have enough curves to be called a woman. And I will always be a slut for wearing a push-up bra. Love the you you set out to be. Be the best version of yourself. Be healthy."

Fans' Reaction

The actress made a special appearance on The Ellen DeGeneres Show to talk about her health issues and suicidal thoughts. Sarah divulged what it's been like dealing with diseases such as gout and endometriosis for the past few years. She even revealed that she had to work through the pain while filming Modern Family. These claims touched deeply her fans' hearts, who are proud of how far she has come.

Sarah has had at least 16 surgeries throughout her life, which is an alarming number for a woman who just turned 30. Because of the sickness, Sarah went through major depression to the point that she actually thought about taking her own life.

Many users filled the comment section with encouraging messages for the actress. One user wrote, "Sarah went through all of this while filming her show Modern Family?! I never knew she was going through that; she is such a strong woman!"

Another person agreed and wrote, "Man, oh man, there are a lot of people out there who don't understand just how emotionally devastating the burden of a serious health condition can be. People don't realize that if you don't have good health, then it can feel like you don't have anything. I'm so glad she's hanging in there, and I hope she gets her miracle soon and makes a full recovery both emotionally and physically."

Thankfully, the actress seems to be doing better as she lives a calmer life with her fiancé Wells Adams.

Next: Why Billy Ray Cyrus Hated 'Hannah Montana'