We employ dynamical mean-field theory to study the optical conductivity σ(ω) of one hole in the Holstein-t-J model. We provide an exact solution for σ(ω) in the limit of infinite connectivity. We apply our analysis to Nd2−xCexCuO4. We show that our model can explain many features of the optical conductivity in this compounds in terms of magnetic/lattice polaron formation.