The impact of isolated-photon data from proton–(anti)proton collisions at RHIC, SpView the MathML sourcep¯S, Tevatron and LHC energies, on the parton distribution functions of the proton is studied using a recently developed Bayesian reweighting method. The impact on the gluon density of the 35 existing isolated-γ measurements is quantified using next-to-leading order (NLO) perturbative QCD calculations complemented with the NNPDF2.1 parton densities. The NLO predictions are found to describe well most of the datasets from 200 GeV up to 7 TeV centre-of-mass energies. The isolated-photon spectra recently measured at the LHC are precise enough to constrain the gluon distribution and lead to a moderate reduction (up to 20%) of its uncertainties around fractional momenta x≈0.02x≈0.02. As a particular case, we show that the improved gluon density reduces the PDF uncertainty for the Higgs boson production cross section in the gluon-fusion channel by more than 20% at the LHC. We conclude that present and future isolated-photon measurements constitute an interesting addition to coming global PDF analyses.