A photoluminescence study of self-assembled InAs/ GaAs quantum dots under the influence of magnetic fields perpendicular and parallel to the dot layer is presented. At low temperatures, the magnetic field perpendicular to the dot layer alters the in-plane transport properties due to localization of carriers in wetting layer ͑WL͒ potential fluctuations. Decreased transport in the WL results in a reduced capture into the quantum dots and consequently a weakened dot-related emission. The effect of the magnetic field exhibits a considerable dot density dependence, which confirms the correlation to the in-plane transport properties. An interesting effect is observed at temperatures above approximately 100 K, for which magnetic fields, both perpendicular and parallel to the dot layer, induced an increment of the quantum dot photoluminescence. This effect is ascribed to the magnetic confinement of the exciton wave function, which increases the probability for carrier capture and localization in the dot, but affects also the radiative recombination with a reduced radiative lifetime in the dots under magnetic compression.