Context. Massive stars form whilst they are still embedded in dense envelopes. As a result, the roles of rotation, mass loss and accretion in massive star formation are not well understood. Aims. This study evaluates the source of the Q-band, λ c = 19.5 μm, emission of massive young stellar objects (MYSOs). This allows us to determine the relative importance of rotation and outflow activity in shaping the circumstellar environments of MYSOs on 1000 AU scales. Methods. We obtained diffraction limited mid-infrared images of a sample of 20 MYSOs using the VLT/VISIR and Subaru/COMICS instruments. For these 8 m class telescopes and the sample selected, the diffraction limit, ∼0.6 , corresponds to approximately 1000 AU. We compare the images and the spectral energy distributions (SEDs) observed to a 2D, axis-symmetric dust radiative transfer model that reproduces VLTI/MIDI observations of the MYSO W33A. We vary the inclination, mass infall rate, and outflow opening angle to simultaneously recreate the behaviour of the sample of MYSOs in the spatial and spectral domains. Results. The mid-IR emission of 70 percent of the MYSOs is spatially resolved. In the majority of cases, the spatial extent of their emission and their SEDs can be reproduced by the W33A model featuring an in-falling, rotating dusty envelope with outflow cavities. There is independent evidence that most of the sources which are not fit by the model are associated with ultracompact H ii regions and are thus more evolved. Conclusions. We find that, in general, the diverse ∼20 μm morphology of MYSOs can be attributed to warm dust in the walls of outflow cavities seen at different inclinations. This implies that the warm dust in the outflow cavity walls dominates the Q-band emission of MYSOs. In turn, this emphasises that outflows are an ubiquitous feature of massive star formation.