old img delete on upload functionality