The effect of the photon emission (bremsstrahlung) in the cross section of the process of direct production of the Higgs boson in the future high luminosity electron and muon colliders is calculated. It was found that cross section at the top of the Higgs boson resonance peak is reduced by factor 0.347 for the electron collider and 0.548 for the muon collider. Machine spread of the centre of the mass energy of 4.2MeV (equal to the Higgs width) would reduce peak cross section further, by factor 0.170 and 0.256 (QED and energy spread) for electron and muon beams respectively. Possible uncertainties in the resummed QED calculations are discussed. Numerical results for the lineshape cross section including QED and many values of the machine energy spread are provided.