New Standards for school food became mandatory in council maintained schools and some academies in January 2015.

But for schools that became academies between 2010 and 2014, the food standards are voluntary.

Schools teaching about a million pupils have failed to adopt the code, says the Local Government Association, (LGA).

The standards restrict the amount of sugary, fried and fatty foods in school meals and require pupils to be offered at least one portion of vegetables or salad as part of their lunch each day

They are mandatory in all council schools, new academies and schools that became academies between 2008 and 2010.

But having to follow them was optional for the 3,896 academies and free schools that opened between 2010 and 2014, as their funding contracts allow them greater autonomy.

Rather than change their contracts, the government wrote to these academies to make a voluntary agreement to comply with the new food standards.

The LGA argues it is essential the government uses a new childhood obesity strategy, expected this summer, to close the loophole and oblige all academies to commit to the same food standards as other state schools.