added image comparison before sending to client