defined delete function of image controller