Twitter said late Tuesday it will remove images and videos of deceased people upon the request of family members, but it put conditions on the policy.

The microblogging service made the announcement a week after the daughter of the late comedian Robin Williams said she would quit Twitter after receiving gruesome images of him from online trolls.

The move also comes as Twitter tried to delete images and video depicting the death of U.S. photojournalist James Foley, who was apparently killed by the militant group Islamic State, better known as ISIS.

‘In order to respect the wishes of loved ones, Twitter will remove imagery of deceased individuals in certain circumstances,’ Twitter spokesman Nu Wexler said in a message about the update to its policies.

‘When reviewing such media removal requests, Twitter considers public interest factors such as the newsworthiness of the content and may not be able to honor every request. . . . ‘