Instagram has changed its policy on content that features weight loss products and cosmetic surgery.

The social media company said users under the age of 18 will be restricted from seeing posts that promote weight loss, like the detox teas made famous by the Kardashians and rapper Cardi B, and will remove content that makes "miraculous weight-loss claims."

RELATED: 'It's a laxative tea': Experts warn about detox tea sweeping social media

Users will be able to flag a post if they believe it violates the new policy.

The detox teas and paid celebrity endorsers have come under fire over the last year from critics like body-positive activist Jameela Jamil.

Jamil worked with Instagram to come up with a way to limit or remove the posts she says are damaging to young women.

"After a bunch of shouting, screaming and petitioning -- we have managed to get the attention of the people at the top, and they have heard us and want to protect us," said Jamil about the announcement on her Instagram page.

The detox teas were the focus of a Call Cristin consumer investigation in July where OHSU dietician Carol Defrancesco said the non-FDA regulated supplements could be dangerous. 

RELATED: The era of the bum and the rise of the deadliest plastic surgery procedure

"Nutritional products can be contaminated with things that we don't know about that can be really harmful," said DeFrancesco.

The dietitian stressed you don't need a tea to detox your body.

"Every time you go to the bathroom you're detoxing, every time you get a good night's sleep, every time you exercise, you're improving your health, you're detoxing," said DeFrancesco.