updated img delete functionality