During the First World War, Mednyánszky enlisted in the army despite his advanced age and fragile health. He became part of so-called 'artist war group'. The work ‘Soldiers in the Rocks’ also belongs in this period and is a study of war events. The artist was interested not only in the war itself but he also often painted landscapes with motifs of marching convoys.