Publication of photography of a child

There is a Court case involving a child that has been trending in the media. While the details of the case are clearly stated, there is no information or photo of the child provided in the media. Even where the child is shown, the images are blurred and concealed. I was wondering whether this action is a requirement of the law or just the good will of the media in protecting the identity of the child. Please enlighten me.
FK, Geita

The media is not protecting the identity of the child out of good will but is doing so because it is a requirement of the law. According to section 33(1) of the Law of the Child Act [Cap. 13 R.E. 2019], a person shall not publish any information or photograph that may lead to the identification of a child in any matter before the Court except with the permission of the Court. Further, any person who publishes any information or photograph contrary to this section commits an offence and upon conviction shall be liable to a fine of not less than TZS 2M and not more than TZS 15M or to imprisonment for a term not exceeding 3 years or to both.

In addition, according to section 7(3) of The Media Services Act, 2016 (Act No. 15 of 2016), a media house is required to ensure that it does not publish information that endangers the safety of a person or invades the privacy of an individual. Based on these laws, the media is obliged to protect the information and identity of the child.