Colonel Richard Kemp, who commanded British forces in Afghanistan in 2006, defended the men, saying they had just suffered a devastating attack and would have felt a justified sense of elation.
Col Kemp said: "The photographs were taken in the immediate aftermath of a very, very devastating Taliban attack. To us, here in the UK two years later, it seems disturbing, but ... I suspect what we see here is a sense of elation that they are still alive at the end of it."
He added that he did not think the pictures would cause "great outrage".
Lord West of Spithead, who was First Sea Lord and Chief of Naval Staff from 2002 to 2006, said the incident - which breaches the Geneva Convention - was unfortunate but had to be seen in the context of the men having survived a deadly firefight.
It emerged last week that the two servicemen, who serve with 51 Squadron RAF Regiment based at RAF Lossiemouth in Moray, were being investigated by military police after the images were passed to the Ministry of Defence.
The photographs were taken after an attack on Camp Bastion in September 2012 in which two US marines died.
The two RAF gunners were on a tour of Afghanistan last month but had now been withdrawn from those duties. It is not clear if they have been flown back to Scotland.