The WFIRST Coronagraph Instrument will perform direct imaging of exoplanets via coronagraphy of the host star. The Phase B optical design fits within a new allocated instrument enclosure and accommodates both Hybrid Lyot and Shaped Pupil coronagraphs. It provides optical path and space for accessible focal planes for occulting masks and field stops. It provides accessible pupil planes for shaped pupil and Lyot masks. It accommodates ten active optical assemblies, including one fast steering mirror, on focusing mirror, two deformable mirrors, and six precision alignment mechanisms. We present the optical design and analyses for the Direct Imaging channel, including polarization imaging. We also present the performance analysis of pupil imaging for starlight illumination and diffused light illumination of the pupil.