This picture is often shared with caption: “Australian soldiers in trenches at the Battle of Polygon Wood, 1917”. However, this image is not a real photograph.
This image called “An episode after the Battle of Zonnebeke” was created by James Francis “Frank” Hurley in 1918. It is a composite scene created from multiple negatives. Some persons considered this and some other works by Hurley as “faked” images. I think they are great examples of pre-photoshop art.
Further reading: Representation, Composites and Frank Hurley by Darcy Moore.