(a) A photograph that depicts a peace officer as defined by Article 2A.001, Code of Criminal Procedure, the release of which would endanger the life or physical safety of the officer, is excepted from the requirements of Section 552.021 unless:
(1) the officer is under indictment or charged with an offense by information;
(2) the officer is a party in a civil service hearing or a case in arbitration; or
(3) the photograph is introduced as evidence in a judicial proceeding.
(b) A photograph excepted from disclosure under Subsection (a) may be made public only if the peace officer gives written consent to the disclosure.