Most likely the props/art department using CGI and/or body doubles
The best source I can find at the moment is a Quora answer, but I'm sure that I've seen a behind the scenes video about creating photo albums for characters, which use the same principles described below.
The section in bold could be used in response to the question - by digitally placing the actor's head on another persons body, and then printing out the photo.
When a movie or TV show requires props that are supposed to be photos of characters as a kid, do they usually use real childhood photos of the actors?
It does happen that actors possess and allow pictures of themselves at a younger age to be used for a set prop or dressing. A common practice, if the photo contains other people, would be to scan the photo, crop out the actor and insert them into a new staged photo with other actors that fits the movie’s need. If the same photo has been used in a previous film, it may be altered so it’s not identical.
It also happens that the art department or digital effects department will create a reasonable facsimile using a young stand-in and then either digitally alter their face (either by hand, using specialized software, using a scanned photo of the actor’s face to work backwards from, etc.), or by finding a young actor/model who strongly resembles the actor at a younger age.
Another option, if the actor has been working in films or modeling since childhood, is to use a still from an earlier point in their career if the rights can be secured.
This really depends on the actor and whether they possess a suitable photo and are willing to allow the production to use it.