We have carried out a near‐infrared imaging survey of luminous young stellar outflow candidates using the United Kingdom Infrared Telescope. Observations were obtained through the broad‐band K (2.2 μm) and narrow‐band filters at the wavelengths of H2 v= 1–0 S(1) (2.1218 μm) and Brγ (2.166 μm) lines. 50 regions were imaged with a field of view of 2.2 × 2.2 arcmin2. Several young embedded clusters are unveiled in our near‐infrared images. 76 per cent of the objects exhibit H2 emission and 50 per cent or more of the objects exhibit aligned H2 emission features suggesting collimated outflows, many of which are new detections. These observations suggest that disc accretion is probably the leading mechanism in the formation of stars, at least up to late O spectral types. The young stellar objects (YSOs) responsible for many of these outflows are positively identified in our images based on their locations with respect to the outflow lobes, Two‐Micron All‐Sky Survey colours and association with Midcourse Space Experiment, Infrared Astronomical Satellite, millimetre and radio sources. The close association of molecular outflows detected in CO with the H2 emission features produced by shock excitation by jets from the YSOs suggests that the outflows from these objects are jet‐driven. Towards strong radio emitting sources, H2 jets were either not detected or were weak when detected, implying that most of the accretion happens in the pre‐ultracompact (pre‐UC) H ii phase; accretion and outflows are probably weak when the YSO has advanced to its UC H ii stage.