Let \(M^n\) be a closed Riemannian manifold of dimension \(n\ge 2\), with Ricci curvature \(Ric \ge n-1\). We will show that any sphere of dimension m in the space of closed loops on \(M^n\) is homotopic to the sphere in the space of closed loops of length at most \(8 \pi m\). It follows that the length of a shortest periodic geodesic on \(M^n\) is bounded from above by \(8 \pi (n-1)\).