The Higher Regional Court of Stuttgart gave the 24-year-old man a suspended sentence of one year and six months on Thursday.
The incident took place in July 2015, when the Iraqi national was posing for the notorious picture as a member of the Iraqi army.
The photo shows the "broadly smiling" man standing behind the decapitated heads of six Daesh terrorist, lined-up in front of the camera and showing the sign of victory with his hand, Judge Claus Belling said.
In the court's opinion, the man's pose showed that he regarded those killed as inferior and severely mocked them, thus depriving them of the right to honor after death.
The court, however, opted for a rather lenient punishment, as the defendant had no previous criminal record and the war crimes were related to enemy fighters who were already dead.
Under what circumstances the Daesh terrorists were killed, who beheaded them and who put their heads on display, remains unclear.
The Iraqi Refugee Came to Germany in 2015
In fall 2015, the man came to Germany as a refugee. The photo was later found by police on his smartphone after he was said to have threatened to kill an Afghan man residing in the same asylum shelter in Böblingen.
The Iraqi national spent more than six months in custody under special detention conditions, before being released on Thursday.
He applied for asylum three times. Since 1 August, according to the court, all applications have been legally rejected.