Timeline:
Dec 6, 1878 Stalin was born
1884 Stalin Contracts Smallpox
Nov 1905 elected delegates to Bolshevik conference in Saint Petersburg.
Apr 1906 Stalin attended the RSDLP Congress in Stockholm; first trip outside the Russian Empire
Aug 1907 attends Congress in Stuttgart, Germany
*1908 Stalin is arrested and serves time at Bailov Prison
1924 Lenin Dies
1928 Trotsky exile
1936 to 1938 Great Purge where Stalin Consolidates power
Aug 21 1940 Trotsky dies in Mexico
Photographs Origins:
So the picture is featured on the cover of the book Young Stalin copyrighted 2007. It appears on both the front and back covers.


In the credits of that book it says the mugshot is from 1912, not 1902 and it's originally obtained for the book from the David King Collection.
David King being a graphic designer and design historian who amassed one of the world’s largest collections of Soviet political art and photographs, which he drew on for revelatory books on Leon Trotsky and the Stalin era, died on 2016 in London.
I found this photo which appears to predate the above book.

It was posted on wikipedia back in 2005 and is credited to a book published in 1950.
Stalin, Foto 1902, copied from the book "Josef Wissarionowitsch Stalin - Kurze Lebensbeschreibung" (Josef Wissarionowitsch Stalin - short live description), Publishing for russian literature in foreign languages, Moscow 1947.
Looking at that image it appears it was changed extensively by wikipedia users, with the latest version coming from the Stalin Museum in Georgia. The Stalin Museum in their gallery of photo's of Stalin, contains several other photo's of the younger Soviet leader. All photo shopped to remove his small pox scares.
I could find no photo's of young Stalin with smallpox scares so maybe he had all of them photoshopped.
I found a few younger stalin photos which were interesting.
Rare Historical Photos

Mugshot of Stalin after an arrest. 1908.
Mugshot of Stalin in 1911

A criminal file on Stalin following his arrest in Baku, Azerbaijan. 1910.

The information card on “I. V. Stalin”, from the files of the Imperial police in Saint Petersburg, 1911
All appear photo shopped to me, except maybe the 1911 mugshot.
If you look at these photos of very young and little older in what I perceive to be chronological order you can tell that Sexy Stalin actually looks nothing like Stalin, older or younger than. In all the photo's you can tell it's the same guy by the eyes and dark hair. Sexy Stalin's eyes are completely different and the hair is lighter. The facial shapes though are the same, and if you check out Stalin's left eyebrow, it traverses a little further to the center than the right eyebrow in all the photos. So it's both the same and not the same. Just like you would expect if an artist tampered with it to give Uncle Joe GQ good looks.

I also found this profile picture which matches Sexy Stalin.
Which led me to believe the pair Sexy Stalin and the above Profile picture are Mug Shots, or based on mug shots.
In conclusion I think the photograph is a Soviet artists creation and although it resembles Stalin, it's really a fugazi which rendered to depict Stalin as more attractive than he actually was.
So then I started looking at when the Soviet Union started modifying pictures for political reasons. It appears they started doing this after Lenin died as Stalin was consolidating power. A lot of those photographic editing for political reasons occurred during Stalin's purges. Especially the Great Purge 1936 to 1938. The Soviets would erase people out of photographs who had lost favor as the below photograph demonstrates.
Censorship of images in the Soviet Union
Censorship of images was widespread in the Soviet Union. Visual censorship was exploited in a political context, particularly during the political purges of Joseph Stalin, where the Soviet government attempted to erase some purged figures from Soviet history, and took measures which included altering images and destroying film. The USSR curtailed access to pornography, which was specifically prohibited by Soviet law.
An example of how the picture was altered again and again after each person fell out of favor with Joseph Stalin.
.
This image taken by the Moscow Canal was taken when Nikolai Yezhov was water commissar. After he fell from power, he was arrested, shot, and had his image removed by the censors.

Yezhov is clearly visible to Stalin's left.
The photo was later altered by censors.
But they also altered images in other ways. Making Stalin appear more heroic, handsome, or involved by super imposing him next to Lenin. All these techniques were pursued.
Answer
So that's my answer. Sexy Stalin was probable retouched during the Great Purge 1936 to 1938. Although Stalin was trying to influence his place in history including his image since 1924 when Lenin Died.
Sources: