Former White House photographer Pete Souza is credited with capturing some of the most iconic photographs of Barack Obama’s presidency – and with keeping it alive via his popular Instagram account.

Now, the former President is returning the favour.

Mr Obama has announced he will write the foreword to his White House photographer's forthcoming book of photos. The book, titled "Obama: An Intimate Portrait," will contain approximately 300 photos of the first African-American president’s time in office.

Mr Souza told The New York Times the photos would show Mr Obama “in all facets of his life”.

“There are pictures that certainly show him stressing in the Situation Room over major decisions, but also pictures of him interacting in fun moments with his girls,” he said.

The photos will be selected from some 10,000 images Mr Souza captured over the years, from high-level security meetings to family vacations.

Mr Souza is a White House veteran, who captured Ronald Reagan’s presidency before working for Mr Obama. He met the young senator from Illinois while working as a photographer for The Chicago Tribune in 2005.

The two bonded quickly, and Mr Souza went on to publish some of the most well-known photographs of Mr Obama’s presidency. He previously published another photo book, "The Rise of Barack Obama," in 2008.

Mr Souza, however, has gained more public notoriety for his coverage of President Donald Trump than his predecessor. The photographer has garnered a sizeable Instagram following for posting perfectly-timed photographs of Mr Obama, designed to contrast poorly with Mr Trump.

Shortly after the Trump administration announced they would reverse the Obama-era policy of publishing White House visitor logs, for example, Mr Souza posted a photo of Mr Obama walking through White House security detectors.

“Hmm,” he wrote. “Bet he was noted in the visitor logs.”

Later, when cameras captured Melania Trump avoiding her husband’s touch, Mr Souza posted an intimate photo of Mr and Ms Obama with the caption, “holding hands”.