An AFP correspondent saw two bodies displayed in the centre of Baquba, a Shiite-dominated city barely 60 kilometres (40 miles) northeast of Baghdad, but security officials counted at least four.
The city is under the control of the Iraqi army and allied Shiite militiamen but is surrounded by many Sunni villages, which have been captured and recaptured several times in recent weeks.
"Several members of Daash were killed yesterday in a battle just north of Muqdadiyah," a nearby town, a police captain said, using the Islamic State's former Arabic acronym.
A senior army officer gave a corroborating account.
More From This Section
Pictures obtained by AFP show one apparently headless body dangling from a utility post as a passer-by tops to snap a photo with his mobile phone.
Another, wearing the baggy sherwal trousers popular with foreign jihadist fighters, is seen hanging from a bridge, next to a banner advertising wedding photography, as traffic passes under.
Islamic State fighters and allied Sunni militants swept through large parts of Iraq's north and west seven weeks ago.
Jihadist-led militants control Fallujah, some 60 kilometres (40 miles) along the main road heading west out of Baghdad.
Holding Baquba, which lies on the easternmost of three roads converging on Baghdad from the north, is considered vital to the defence of the capital.