Trainspotting author Irvine Welsh, is backing a new campaign against library cuts in Scotland, saying his own local library helped make him a writer by opening up wider worlds to him as a child.

He has been in Scotland for the premiere in Edinburgh of the sequel film T2 Trainspotting, with the cast and director Danny Boyle. He took time to lend his support to a national campaign from the Chartered Institute of Library and Information Professionals in Scotland (CILIPS).

According to the institute public libraries return £8 for every £1 invested and have 28 million visits a year, more than premiership football in Scotland. However they are still often seen as a soft target by many local authorities.

The Libraries Matter campaign is set to launch in February in the lead up to Scotland’s local government elections in May. It is in response to the threat of closure and reduction in library services, and will highlight the benefits and value that libraries deliver and show why public and school libraries matter so much.

Last year it was calculated that almost 8,000 jobs in UK libraries had disappeared in six years, about a quarter of the overall total. The ?service reductions and job losses have been at a lower rate north of the border, but there are fears things could get worse. Fife is closing eight libraries and looking at 'alternative service delivery' options for eight more. This follows on earlier closures in cuts in the likes of Moray, where in 2013 plans to axe seven of the 15 council libraries were scaled down to four closures.

Library closures are also on the agenda in North Lanarkshire along with reductions in the mobile library service.

Already Argyll and Bute Council's need to cut costs saw 10 secondary-school librarian posts removed over last summer. Now only 11 out of 32 Scottish local authorities have a full time qualified librarian in every secondary school, every day.

Irvine Welsh said: "I grew up in a scheme where every house and street pretty much looked the same. As a kid it was essential to have your imagination fuelled by a psychic portal into different worlds. That was my library in Muirhouse. That was why I became a writer and why camera crews from all over the world and Hollywood film stars and executives descended on my home town for the premiere of the film of my book.”

His comments follow those of the acclaimed author behind children's novel The Gruffalo who wrote to Nicola Sturgeon last year warning hat moves to cut school librarians in Scotland would lead to a "decline in literacy".

The Libraries Matter campaign will ask candidates standing in the council elections if they will invest in public libraries and support librarians and ensure school libraries are staffed by a professionally trained, full time and on-site librarian and open every day.

Catherine Kearney, Director of CILIP in Scotland said: “CILIPS welcomes the support for our campaign from Irvine Welsh as Scotland’s local authority elections approach. Now is the time to speak out and tell local Councillors and Government why libraries matter to each and every one of us. Libraries are vital to promoting social cohesion in Scotland’s communities, providing informal learning opportunities, promoting reading for pleasure, helping to improve literacy, developing digital skills, supporting access to benefits and contributing to raising attainment in our education sector.”