It was quite a year for 25-year-old rap star Cardi B. She released her No. 1 debut album to rave reviews. She nearly broke the Internet by revealing her pregnancy during a performance on “Saturday Night Live.” She landed an opening slot on Bruno Mars’s upcoming world tour.

Then, in July, two weeks after she gave birth to a baby girl, Cardi B made an unexpected announcement: She was dropping out of the fall tour. With a newborn, it was too much.

“I thought that after giving birth to my daughter that 6 weeks would be enough time for me to recover mentally and physically,” she wrote on Instagram. “I also thought that I’d be able to bring her with me on tour, but I think I underestimated this whole mommy thing.”

Supportive comments streamed in from fans, as well as from Mars (“Most important thing is you and your family’s health”) and others who were pleasantly surprised to see a celebrity — especially one at the top of her game — acknowledge the physical toll of childbirth and the difficulty of being a new mom.

“Feel like @iamcardib (and @serenawilliams) have done more of late to dispel the myths and break down barriers/unmentionables around working mothers than 100,000 momblogs have done in the past 5 years,” journalist Marissa Moss tweeted.

This recent candor from Hollywood stars is a marked difference from the way many celebs talked about pregnancy, childbirth and motherhood in the past. Years ago, a pregnant starlet might drop out of the spotlight for a while — only to reemerge in a magazine looking well-rested and snuggling with an angelic infant.

See various People magazine covers: Jennifer Lopez in 2008, resplendent in a floor-length gown with an infant nestled in each arm, above the headline “TWIN BLISS!”; Angelina Jolie in 2006, gazing adoringly at Brad Pitt, as baby Shiloh snoozes away; Julia Roberts, looking dewy and fresh-faced in 2005 as she cradles her twins.

Now fans are starting to see a different side of postpartum celebrities: Model Chrissy Teigen shares an Instagram story that features her stretch marks and confesses that she’s “super insecure” about her body; actress Olivia Wilde posts an Instagram photo of her messy bun with the caption, “I call this hairstyle, ‘keep the kid alive’ ”; tennis legend Serena Williams tweets about balancing work and her daughter: “She took her first steps . . . I was training and missed it. I cried.”

The common denominator in all those examples, naturally, is social media. The advent of Facebook, Twitter, Instagram and Snapchat made stars realize that they could connect with the public on a deeper level about personal subjects — and that fans appreciated honesty about the less-than-glamorous aspects of their #blessed lives.

“Social media has been such a game changer. . . . Celebrities are speaking directly to the fan base. Once they started doing that, things just got a lot more real,” said Kate Coyne, executive editor of People magazine. “One evolution of that concept has been celebrities sharing the realities of pregnancy, infertility, child-rearing, infancy, toddlerhood. It goes hand in hand with what social media is all about.”

After all, there are few topics more universal — yet intimate — than childbirth and parenthood. And who’s more relatable: A star who insists that the baby weight just magically fell off? Or Anne Hathaway, who Instagrammed a photo of jeans cut into shorts after her son was born, because her shorts from the previous summer no longer fit? (“There is no shame in gaining weight during pregnancy (or ever),” she wrote.) Or Pink, who posted a picture at the gym after her second baby was born and wrote, “Stay off that scale ladies! #feelingmyself #strongismygoal”?

Of course, there are some notable differences: Many celebrities are extremely wealthy, with access to top-notch medical care and strong support systems; they often have the luxury of deciding when they can go back to work. Still, fans had sympathy for what Cardi B and Williams were going through. No matter if you’re a famous singer or a tennis star, everyone has the same baseline insecurities.

“Most moms have had that feeling — if you are a working mom or intend to be a working-outside-the-home mom, you inevitably feel like . . . ‘I gotta get back out there — people will forget about me, people will replace me, I can’t let opportunities pass me by,’ ” Coyne said. Who can’t relate to that?

Lately, celebrities have also been spilling details about serious medical issues surrounding childbirth. In January, Williams told Vogue that she had a potentially fatal complication during labor, including blood clots in her lungs. At first, she said, the medical staff didn’t listen to her concerns when she said something was off. The story struck a chord and sparked a wider dialogue about maternal mortality rates, particularly for women of color.

“The impact that Serena Williams had in sharing her story not being trusted in her own body . . . I don’t think we can underestimate the impact of that,” said Renée Ann Cramer, the author of “Pregnant With the Stars: Watching and Wanting the Celebrity Baby Bump.”

Several months later, Beyoncé revealed in a Vogue cover story that she had to undergo an emergency Caesarean section after being diagnosed with preeclampsia while pregnant with her twins.

When celebrities publicly discuss these situations, experts say, it can be beneficial for all of us. For example, quite a few stars, including actress Amy Smart and TV personality Maria Menounos, have opened up about challenges in conceiving and shared their experiences with in vitro fertilization and surrogacy. Hayden Panettiere, Teigen and others have talked about their postpartum depression. These aren’t easy subjects for many people, but the topics become a little less taboo whenever they become part of the mainstream conversation.

“When celebrities talk about something that’s really difficult, like a mental-health challenge, they’re sending a signal it’s okay to talk about these things, and these things are part of normal human experience,” said Steven Hoffman, a professor of global health, law and political science at York University in Canada.

Hoffman, director of the Global Strategy Lab, has studied why humans are hard-wired to follow celebrity medical advice (it’s a combination of biological, psychological and social factors). Although he advises people to listen to their physicians, there’s no denying that stars can influence how their fans think about health.

“People follow in the footsteps of those who they want to be like or those who they perceive to have qualities that they admire,” Hoffman said. “What that means is people are looking up to celebrities and want to be like celebrities; when they say something or expose an issue, those same people are likely to be affected.”

Sometimes, doctors don’t love it when Hollywood stars’ medical issues are in the news, saying it can unnecessarily panic patients. But at the end of the day, it can at least break the ice on a tough topic.

“It enables conversations that some folks just aren’t going to have,” Cramer said. “Even though [celebrities] are rich and famous, they’re still human.”

More from The Washington Post: