remove image logic