We report spatially and temporally resolved measurements of magnetic fields generated by petawatt laser-solid interactions with high spatial resolution, using optical polarimetry. The polarimetric measurements map the megagauss magnetic field profiles generated by the fast electron currents at the target rear. The magnetic fields at the rear of a 50 $mu$m thick aluminum target exhibit distinct and unambiguous signatures of electron beam filamentation. These results are corroborated by hybrid simulations.