The picture shows a German cavalryman patrolling behind the front lines while carrying a steel lance. German lances were hollow tubes made of rolled steel, with a length of 3.2 meters they were usually made in three sections fitted together. It weighed 1.6 kg and was extremely well balanced when held at the leather wrapped grips halfway down. Prior to the outbreak of World War I, there had been controversy as to whether lances or sabres were the more effective “armes blanches” (that is edged weapons) for cavalry, but neither proved a match for modern firearms.
Generally the troops can retreat faster than they can advance, so in an age when “breakthrough” machines (tanks, armored cars) either did not exist or were even slower than walking men, cavalry was given the task or harassing a retreating army in an attempt to turn their retreat into a rout and prevent them forming a defensive position further back. So cavalry was not meant to be charging into the teeth of machine guns, but rather charging into groups of men as they fell back, hoping to break whatever discipline they had left.
Throughout the Western Front of both sides had large bodies of cavalry on “standby” when they launched big offensives, in the hope that they could break the enemy line and the cavalry could turn a little tear in the line into a huge opening. However, from 1914-early 1917 the offensive strategy used on the Western Front undermined the ability of cavalry to fulfill this role – week-long artillery barrages gave the opposition time to prepare secondary lines of defenses and bring up reserves to fill those lines. So rather than charging into a disorganized mass of retreating men they found freshly build trenches and machine guns – exactly what they were meant to prevent. Therefore the cavalry had little use. However German lancer units were more usefully employed in the war against Russia because the battle was more fluid and less encumbered with barbed wire trenches that tied up the Western Front.