Will Smith is in early talks to voice the Genie in Disney’s live-action “Aladdin” reboot from director Guy Ritchie.

The role was famously voiced by Robin Williams in the 1992 classic and would mark Smith’s first animated film since DreamWorks Animation’s 2004 comedy “Shark Tale.”

Following a string of adult dramas and action movies like “Collateral Beauty” and “Suicide Squad,” Smith has been eyeing a family-friendly film as his next project. He was circling the lead role in “Dumbo,” but walked away from a deal due to scheduling conflicts.

Disney and Smith were still interested in working together though, so the studio shortlisted him when this opportunity arose.

The studio plans to cast newcomers as Aladdin and Jasmine.

John August, whose credits include “Big Fish,” wrote the new “Aladdin” script. Dan Lin, who produced Ritchie’s two “Sherlock Holmes” movies for Warner Bros., is also producing “Aladdin” through his Lin Pictures company. Jonathan Eirich is exec producing.

The original animated movie was a comic take on the Arabic folk tale of a young man granted three wishes by a genie trapped in a lamp.

“Aladdin” was the highest-grossing film of the year in 1992, and won Academy Awards for best score and best song for “A Whole New World.”

Smith can be seen next in Netflix’s fantasy actioner “Bright.” He is repped by CAA and Overbrook Entertainment.

Deadline Hollywood first reported the news.