We present rest-frame ultraviolet images of six luminous quasars at z ∼ 4.8 obtained with the Hubble Space Telescope (HST). These quasars exhibit a wide range of star formation rates (SFRs) and lie in a wide range of environments. We carefully model and subtract the point-like quasar emission and investigate the morphology of the underlying host galaxies at kpc scales. The residual images allowed identification of potential companion sources, which enabled us to explore the role of galaxy merger scenarios in the coevolution of the quasars and their hosts. We also search for the mechanism driving extreme SFRs in three of the six quasars. We find that the rate of detection of potential companions to the host galaxies does not follow trends between high- and low-SFR sources; i.e., the HST imaging suggests that both high- and low-SFR sources are found in both dense and sparse galactic environments. The suggested role of major mergers driving extreme SFRs cannot be supported by the multiwavelength data in hand. Three of four companion sources, previously revealed by submillimeter observations, are not detected in the HST images of three of our quasars. An adapted high-resolution imaging strategy focused on high-SFR sources and extended to a larger quasar sample is required in order to determine the role of mergers in the processes of star formation and supermassive black hole growth at high redshift.