update media preview when deleting an element