The story this goes with is called A Tragedy of Frontier Fort Life.
Published first in McClure's Magazine in 1900.

The caption reads "Between the two ranks Clarke was made to walk-- walk, not run-- and as he passed each man... gave him a smart lash with a surcingle."