We describe a method of imaging the intensity profiles of light in near-field lithographic experiments directly by using a sensitive photoresist. This technique was applied to a detailed study of the irradiance distribution in the optical near field with contact-mode photolithography carried out by use of elastomeric phase masks. The experimental patterns in the photoresist determined by scanning electron microscopy and atomic force microscopy were compared with the corresponding theoretical profiles of intensity calculated by use of a simple scalar analysis; the two correlate well. This comparison makes it possible to improve the theoretical models of irradiance distribution in the near field. Analysis of the images highlights issues in the experimental design, provides a means for the optimization of this technique, and extends its application to the successful fabrication of test structures with linewidths of ~50 nm.