Children as young as eight have been involved in the exchange of indecent images via social media, an investigation has found.

Councils and police have recorded incidents involving communications between a 17-year-old and a 12-year-old and a case in which the perpetrator was aged only 10.

Eight Scottish forces and 23 council education departments provided what details they could of so-called "sexting" cases, the practice of teenagers sharing indecent pictures by social media, mobiles and text.

The details emerged before a conference on child protection and the web in Stirling today.

They show teachers, parents and children reported incidents to schools and police. It is believed many cases go unrecorded.

Four police forces declined to respond to The Herald's Freedom of Information request, pointing out that while it may break the law there is no specific offence of sexting, making it hard to identify cases.

Grampian Police confirmed it has investigated 24 incidents over the last three years, with eight children referred to the Children's Reporter.

Chief Constable Colin McKerracher said: "Professionals are coming across more situations where young people are at risk or have been harmed by experiences with the net."

Fife Police found four possible cases, while Lothian recorded five in 2011 and eight in 2012.

Central Scotland said under-18s had been involved in 16 cases of sexting over the last three years, and provided a detailed breakdown of ages showing the youngest child "accused" of sexting had been 10, while the youngest "victim" was nine. One case featured a 12-year-old child and a 17-year-old perpetrator.

Councils were also at odds over the issue, with most education departments stating data was not held or could not be readily accessed. Angus said its schools witnessed six incidents in the last three years, with the youngest victim, in 2010/11, aged eight.

Moray recorded 19 cases between 2009 and 2012, with children involved ranging from 11 to 17, and Scottish Borders council had 13 cases, with children aged 11 to 16.

Nine councils did not respond and a further nine said they could not provide information.

Today's conference, organised by national child protection agency WithScotland, based at Stirling University, aims to help those working in health, education, social work and police, who say they need guidance on dealing with the practice.

About 160 delegates will attend the event which will cover sexting and other threats. These include cyber-bullying, other issues associated with social media such as Facebook and Twitter, and online gambling.

It aims to share the latest research and evidence on how to protect children and young people online. A new internet safety resource pack for professionals working with young people will be launched.

Ethel Quayle, senior lecturer in clinical psychology at Edinburgh University, is researching sexting in the UK, Sweden and Germany.

She said the difficulty for professionals was often knowing how to respond to the problem.

She added: "The boundaries around what is exploratory behaviour and what is problematic are very blurry and in some cases it is better not to turn this into a criminal justice scenario."

WithScotland director Beth Smith said: "Practitioners increasingly have to help children and young people balance risks and opportunities online, recognising the realities of sexual offending and online sexually problematic behaviours."

She said high demand for today's event means another is already planned.