We study the influence of the nucleon spectral function on photoproduction and electroproduction on nuclei. Besides kinematical effects due to ground state correlations, also a modification of the S 11 ͑1535͒ decay width is taken into account, which is caused by the possible decay into nucleons with mass smaller than the pole mass in the medium. Hence, resonances with masses below the free N threshold can contribute to production.