Photo of Hilary Duff's 8-month-old baby with pierced ears sparks Instagram debate: Here's what parents should know

A pediatrician shares safety guidelines.

A seemingly innocent moment Hilary Duff thought she was sharing with fans has ignited unexpected controversy on Instagram.

The actress-singer recently posted a photo of herself holding her 8-month-old daughter, Banks, who appeared to have ears pierced.

Duff's prior posts show the child earring-free, which could be what caused the so-called mommy shaming against the mother of two.

"We usually recommend the youngest being 3 months due to risk of infection from a process like piercing," Dr. Julie Capiola, a pediatrician with Premier Pediatrics in New York, tells "Good Morning America." "It's a cultural or personal choice to whether or not parents want to pierce [their] child's ears."

Some Instagram users gave Duff flack for her daughter's studs, while most fans came to her defense.

"They pierced my ears 2 days after I was born," one follower said.

"[Cause] you were not given a choice," another replied. "It is dangerous [especially] when they get to toddler age and could pull [the] earring off and swallow it."

"Can we maybe NOT permanently scar babies for no reason other than accessorizing them?" someone commented. "That would be great."

A fan chimed in with a different approach: "We love you Hilary, you’re doing amazing sweetie, please don’t let these internet trolls ruin your day."

"Keep being the fabulous mother u are!" another said.

Many people commented how they had their ears pierced as a newborn, but Capiola advises against it, adding how there's a lower risk for infection after the appropriate vaccinations have been given to a child. Plus, the child's immune system is stronger at 3 month old and after, Capiola said.

Capiola says as long as they're 3 month or older, ear piercing is OK for kids.

Here are safety guidelines and more.

A sterile environment is advised

Choose an appropriate metal

Use a screw back

Will my child feel any pain?

"It's usually brief," Capiola said.

Watch for signs for infection

Avoiding infection

"Follow the advice of the piercer or doctor for cleaning techniques," added Capiola