Interplay of electron–lattice interactions and superconductivity in Bi2Sr2CaCu2O8+δ