The technique of terahertz imaging has created potential application in science, industry and medicine. In this article, we describe an all-optical THz imaging system based on the optically rectified THz generation and electro-optic sampling detection. A novel polarization modulation technique introduced in this imaging system has improved the dynamics range. The optimal working position for the electro-optic sampling geometry using the nearly zero optical bias point has been found. The theoretical analyses behind the above techniques are also included. As examples, the THz images of mammographic phantom and the watermarks of several common currencies are presented to demonstrate the possible applications of this THz imaging system.