The Ministry of Justice is changing its policies for the release of coronial files.
The change comes after a woman complained about receiving graphic police photographs of her son who had committed suicide.
The woman, who wished to be known as Ann Johns, had requested the coronial file of her son's case and was horrified to find photographs of his body in the file.
She complained about the photos and has now received an apology from the Ministry of Justice.
Its chief executive, Andrew Bridgman, said he would be contacting her to convey his regret.
Mr Bridgman said the ministry was changing its procedures to make sure applicants were informed explicitly what files contained.
Applicants would also be asked to formally specify what contents they did and did not want.
The ministry's website previously asked applicants to tick the areas they wanted.
Earlier, Ms Johns said she had not told the ministry not to send the pictures, because she had no idea that they would be sending them.
"They were graphic and they were horrific and once you've seen that it cannot be unseen."
Where to get help:
Lifeline: 0800 543 354
Suicide Crisis Helpline: 0508 828 865 / 0508 TAUTOKO (24/7). This is a service for people who may be thinking about suicide, or those who are concerned about family or friends.
Depression Helpline: 0800 111 757 (24/7)
Samaritans: 0800 726 666 (24/7)
Youthline: 0800 376 633 (24/7) or free text 234 (8am-12am), or email email@example.com
What's Up: online chat (7pm-10pm) or 0800 WHATSUP / 0800 9428 787 children's helpline (1pm-10pm weekdays, 3pm-10pm weekends)
Kidsline (ages 5-18): 0800 543 754 (24/7)
Rural Support Trust Helpline: 0800 787 254
Healthline: 0800 611 116
Rainbow Youth: (09) 376 4155
If it is an emergency and you feel like you or someone else is at risk, call 111.