Ended code for deleting images and videos