We present a study of the influence of the probe composition on the formation of constant-height photon scanning tunneling microscope images when observing a dielectric sample. Dramatic effects due to the metallization of the tip are presented and discussed in detail. We show how the recorded images can look quite different when the probe is dielectric or coated with gold. Comparison with numerical calculations indicate that the experimental signals are of electric or magnetic nature depending on the composition of the tip. For well-defined conditions, gold-coated tips provide images of the distribution of the magnetic field intensity associated with the optical near field. To get more insight into the origin of this effect, we have performed a careful analysis of the plasmon modes associated with a gold-coated dielectric cylinder. We conclude that the detection of the optical magnetic field is related to the conditions of excitation of circular symmetry plasmon, or ring plasmon, in the gold-coated tip.