Image formation in near-field optical imaging of magnetic domain structures in thick ferromagnetic films is investigated. Magnetic domain images acquired in different illumination conditions and polarization configurations show that the resolution and contrast depend on the angle of incidence of the illuminating light, the orientation of the light polarization with respect to the domain wall and the detected polarization component of the collected light. The contribution of in-plane magnetization components increases for larger angles of incidence. Analysis shows that the parameters limiting the near-field resolution in the case of thick ferromagnetic films are Bragg selectivity in the diffracted field on magnetic domains and filtering higher spatial harmonics. These effects depend on the size and periodicity of the domains and lead to the image degradation even in the near-field proximity of the film surface limiting resolution of the observation of domain walls of sub-wavelength size.