Photographer Pete Souza has reflected on eight years looking at former President Barack Obama and “throwing shade” at President Donald Trump through his Instagram account.

His new book Obama: An Intimate Portrait showcases some of Mr Souza’s favourite images from the nearly two million he took during the Obama presidency.

Some have become posts on his Instagram account, usually timed with Mr Trump’s often-controversial tweets.

Mr Souza told National Public Radio that he is aware of his reputation for “throwing shade” at Mr Trump and joked he had to look up the term because he was not sure what it meant.

“I kind of laughed I guess,” he said.

However, he does his best to be “somewhat subtle and respectful in the words that I write” and said he feels his feed, “compared to what some people write on Twitter,” is “very respectful.”

“I think people can interpret them [however they want to],” Mr Souza said.

Some of his more popular posts include responding to Mr Trump's comment in the wake of four US soldiers' deaths in an ambush in Niger when he said previous presidents, particularly his predecessor, had not called or spent time with Gold Star families.

This was Mr Souza's response to the President's tweets criticising fellow Republican and Senator Bob Corker for disagreeing with him after Mr Corker said the White House resembled a "day care".

During the first week of Mr Trump's presidency he signed the travel ban executive order, barring travellers from six Muslim-majority countries including Syrian refugees fleeing violence in that country, Mr Souza posted this picture of Mr Obama smiling and speaking with a child refugee.

He also reflected on “trying to be a piece of the woodwork” during his years at the White House, as he was a silent presence at sensitive national security meetings, briefings about national tragedies, and the more light-hearted moments Mr Obama often shared with children visiting the Oval Office.

Mr Souza’s book includes now-iconic images ranging from the moment in the Situation Room just ahead of the assassination of terrorist Osama bin Laden to when Mr Obama leaned over to a staffer’s young African-American son to let him touch his head so the boy could see they had similar hair.