The spectral transmittance of infrared fibers was measured while they were undergoing flexing procedures leading to mechanical fatigue. Microscopic mechanical defects were detected through their influence on the optical losses, without interfering with the deformation. Such experiments were successfully carried out on infrared transmitting silver-halide polycrystalline fibers. The spectral characterization provides a probe of the defects, as their effect is related to the ratio between defect size and wavelength. The method discussed here may be used to examine theoretical models concerning the dynamics of mechanical defects and optical guiding in fibers with defects.