This is soldiers posing for a photograph in the grounds of Glossop's Partington Hospital, where they were taken to convalesce after being wounded in the First World War.
They were most likely to be officers.
All seem to be wearing the same kind of ‘uniform’, the man next to the Matron could be cuddling the hospital dog, while sitting on the front row is one holding a musical instrument.

"Your Council, Your Voice"
Major emergency as fire sweeps across 400M of Tintwistle moorland
Vigil held in Glossop to mark Refugee Week
St John Ambulance have issued first aid advice to help people stay safe in the sun