Formation of electron pairs is essential to superconductivity. For conventional superconductors, tunnelling spectroscopy has established that pairing is mediated by bosonic modes (phonons); a peak in the second derivative of tunnel current d2I/dV2 corresponds to each phonon mode1,2,3. For high-transition-temperature (high-Tc) superconductivity, however, no boson mediating electron pairing has been identified. One explanation could be that electron pair formation4 and related electron–boson interactions are heterogeneous at the atomic scale and therefore challenging to characterize. However, with the latest advances in d2I/dV2 spectroscopy using scanning tunnelling microscopy, it has become possible to study bosonic modes directly at the atomic scale5. Here we report d2I/dV2 imaging6,7,8 studies of the high-Tc superconductor Bi2Sr2CaCu2O8+. We find intense disorder of electron–boson interaction energies at the nanometre scale, along with the expected modulations in d2I/dV2 (refs 9, 10). Changing the density of holes has minimal effects on both the average mode energies and the modulations, indicating that the bosonic modes are unrelated to electronic or magnetic structure. Instead, the modes appear to be local lattice vibrations, as substitution of 18O for 16O throughout the material reduces the average mode energy by approximately 6 per cent—the expected effect of this isotope substitution on lattice vibration frequencies5. Significantly, the mode energies are always spatially anticorrelated with the superconducting pairing-gap energies, suggesting an interplay between these lattice vibration modes and the superconductivity.