A facile and green method was developed to fabricate Nd-DTPA on a large scale without byproducts for CT/spectral CT and NIR II fluorescence imaging of the gastrointestinal tract in vivo.