The US Department of Justice is gearing up for a prosecution of Wikileaks founder Julian Assange and is now "optimistic" about the prospect of doing so, according to a new report citing "people in Washington familiar with the matter."

Prosecutors have weighed several types of charges against the journalist, who has been confined to the Ecuadorian Embassy in London since 2012 after he was granted asylum under former President of Ecuador Rafael Correa.

The sources who spoke with the Wall Street Journal would not say whether the US is negotiating with Ecuador or the UK over the release or extradition of Assange, but commented that recent developments gave them hope about securing his release to US authorities.

Assange has fallen out with the government of Ecuador under its current president, Lenin Moreno, who came into power in May 2017. Moreno has described Assange as a "stone in our shoe" because of the high profile leaks he has published, including emails belonging to the Democratic National Committee (DNC), which Wikileaks released in the run-up to the 2016 presidential election. Assange's take-no-prisoners method of dealing with world governments has put him between a rock and a hard place in the embassy, and on thin ice in terms of his asylum.

This is not the first time that media has reported that an indictment against Assange is imminent. CNN was the first to report in April that US officials "have prepared charges to seek the arrest of Wikileaks founder Julian Assange." That report cited "US officials familiar with the matter," and Assange's lawyer, Barry Pollack, who denied it.

Secretary of State Mike Pompeo, who once promoted the DNC leaks on his Twitter account while serving in the House of Representatives, has reversed course since he was appointed first to head the CIA and then the State Department. In April 2017 in his first speech as CIA Director, Pompeo called the outlet a "non-state hostile intelligence service."