Large lattice responses in a mixed-valence Prussian blue analogue owing to electronic and spin transitions induced by X-ray irradiation.