Electronic transport is localized in low-dimensional disordered media. The addition of gauge fields to disordered media leads to fundamental changes in the transport properties. We implement a synthetic gauge field for photons using silicon-on-insulator technology. By determining the distribution of transport properties, we confirm that waves are localized in the bulk and localization is suppressed in edge states. Our system provides a new platform for investigating the transport properties of photons in the presence of synthetic gauge fields.