Donald Trump has lashed out after old photos of immigrant children in steel cages that were taken while Barack Obama was in the White House were linked to the current administration.

The US president launched a scathing attack on journalists and Democrat voters who shared the old photos on Twitter in order to highlight the Trump administration’s crackdown on immigrants.

“Democrats mistakenly tweet 2014 pictures from Obama’s term showing children from the Border in steel cages,” Mr Trump tweeted on Tuesday.

“They thought it was recent pictures in order to make us look bad, but backfires. Dems must agree to Wall and new Border Protection for good of country...Bipartisan Bill!”

The old images gained increasing traction on Twitter - with critics monopolising on them to express outrage at the Trump White House.

But the images being shared are four years old and were of detainees in a holding cell where hundreds of mostly Central American immigrant children were being processed and held at the US Customs and Border Protection Nogales Placement Center on 18 June 2014 in Nogales in Arizona.

Local news site AZ Central alerted people to the fact they had published the initial photos which were being falsely connected to the Trump administration.

Jake Silverstein, Editor-in-Chief of The New York Times Magazine, apologised for erroneously linking the images to Mr Trump.

"This link, which was flying around earlier today, is from 2014. Still disturbing of course, but only indirectly related to current situation. My bad for RT’ing without closer inspection and implying by timing that it’s current." the journalist tweeted.

Fellow journalist Shaun King and CNN reporter Hadas Gold also tweeted in disgust at the old Obama-era photos.

Jon Favreau, former Director of Speechwriting for President Barack Obama, was similarly disparaging about the images.

"Look at these pictures. This is happening right now, and the only debate that matters is how we force our government to get these kids back to their families as fast as humanly possible," he said in a since deleted tweet.

The outrage over the old images were partly spurred by the unrelated revelation Homeland Security “lost track of” almost 1,500 illegal-immigrant minors after they were released.

The acting assistant secretary for Children and Families at the Department of Health And Human Services, Steven Wagner, addressed the whereabouts of immigrant children during his testimony before the Senate last week - stating the department was "unable to determine" where some 1,500 immigrant may be located.

The misplaced fury over the photos also comes after the Trump administration's controversial new policy of taking children away from parents caught unlawfully crossing into America with them on the southern border. The White House has said the practice is a deterrent to illegal immigration.