implemented delete images in view function