New York City is iconic for its yellow taxis, pizza slices, bright lights on Broadway and its rats.

Mountains of black garbage bags line cramped city sidewalks, a feast for the millions of rodents who call New York home.

But such unsanitary eyesores could soon be a remnant of the city's past, with local authorities launching a "trash revolution" to clean up the streets.

Since the beginning of March more than 200,000 food-selling businesses have been required to use hard-lidded bins to store the millions of tons of garbage they produce annually.

By 2026 residential buildings will also be required to use such containers, a plan inspired by the approach used in cities including Barcelona, Madrid and Buenos Aires.

A pilot program is underway in Manhattan's northern Harlem neighborhood.

The city will eventually lose some 150,000 parking spaces -- an eternal sore spot for many New Yorkers -- as a result of the new container rollout, but advocates say any protest might be diluted by the pleasing results of the clean-up.

"It's a change for me," said Ron James, a Harlem resident. "I come in at night, and a lot of times I have to walk in the streets to avoid the rats walking on the sidewalk.

Now, he added, "I'm barely seeing rats on the streets."

Another resident, Maxwell Rodriguez, said he's grateful his community has stopped getting fined when garbage bags end up in the street.

The hard-lidded containers should also dissuade human scavengers, who often rip open plastic bags while searching for bottles or cans to sell for cash.

The city of 8.5 million people and the millions of tourists who visit each year produce some 20 million tons of trash a day, more than half of it from businesses, according to City Council figures.

- 27 miles of trash -

If a day's trash bags were lined up, they would reach 27 miles (43 kilometers), five miles more than the perimeter of Manhattan island, the council said.

Businesses use a private waste-collection system, while the nearly 10,000 employees of the city's sanitation department deal with trash from residences, schools and hospitals.

New York is one of the most densely occupied cities on the planet -- particularly Manhattan, whose 1.7 million inhabitants mostly live in high-rise buildings with no space in between.

Finding room for large containers that can accommodate the buying habits of a consumption-crazed society, accustomed to using and then quickly discarding what they buy, is a complex challenge.

It is a "big problem," said Steven Cohen, a professor of environmental and public affairs at Columbia University.

Practically, the only place containers can be placed is on sidewalks, intruding on the space used by pedestrians, or in streets, further complicating traffic.

In some blocks, the containers will take up a full one-fourth of sidewalk space, experts estimate.

The city will have to introduce specially adapted trucks to lift and remove the new containers. At present, that work is done by hand, one bag at a time -- a demanding physical job that takes a toll on sanitation employees.

These workers "deserve a solution that protects their bodies," said city sanitation commissioner Jessica Tisch, just as "every New Yorker deserves a solution that cleans their streets."

- Limited recycling -

Since the closure of the world's largest landfill -- in the New York borough of Staten Island, in 2001 -- the city's trash has ended up in a network of waste-to-energy facilities or landfills in other states as far distant as South Carolina, more than 700 miles away.

"Nobody likes to be near a waste transfer station," said Columbia's Cohen, a specialist in sustainability.

But he sees hope in the mountains of trash. He believes a paradigm shift, aided by artificial intelligence, can turn waste into a major new energy source.

At present, he adds, less than 10 percent of all trash is recycled.

With less than three percent of organic waste currently being recycled, the city has begun a plan to provide special compost containers -- which will become mandatory starting next year.

Cohen said all food waste will be recycled, either turned into compost or converted by a so-called anaerobic digester into methane or nitrogen fertilizer.

It will take time for people to get used to the new approach, he said.

"Any change this big, with a city of this size, will take several years before it's really seen," he said.

"But I think it's going to happen."