delete method working on front and back end, fixed img div appending