James Franco may cameo as Hugh Hefner in ‘Lovelace’

How’s this for perfect casting?

The upcoming biopic of porn star Linda Lovelace (star of the notorious 1972 film “Deep Throat”) may include a cameo by James Franco as “Playboy” kingpin Hugh Hefner.

The “Spider-Man” star, who was an early choice to play the film’s male lead Chuck Traynor, is in talks to appear in the film as the famous pipe-smoking lothario/magazine publisher, according to Variety.

Amanda Seyfried (“Red Riding Hood,” “In Time”) is playing the title character, who reluctantly became a household name after her role in the hardcore film-turned-mainstream hit.

Hank Azaria is set to star as “Deep Throat” writer-director Jerry Damiano, while Bobby Cannavale and Chris Noth will play the film’s producers, Butchie Peraino and Anthony Romano. Peter Sarsgaard is playing the role of Traynor, the pornographer husband of Lovelace (real name: Linda Boreman). Sharon Stone, Robert Patrick, Juno Temple and Wes Bentley are also starring in the film, which has yet to cast such other notable real-life names as Harry Reems, Gloria Steinem and Sammy Davis Jr.

The film would reunite Franco with his “Howl” co-directors Rob Epstein and Jeffrey Friedman. Franco was recently seen in “Your Highness” and “Rise of the Planet of the Apes,” and will soon appear in “Oz: The Great and Powerful.”

The Lovelace saga was recounted in the hit 2005 documentary “Inside ‘Deep Throat’.”