This page has some information about how these selfi photos have been taken (in Chinese). [or actually: how and
for what purpose ]
There is also a rather illustrative animation.
Below are some quotes from this page - a very coarse Google translation:
"...A camera weighing only 680 grams is unlocked, and it is gradually moving away from the spacecraft at a speed of about 0.2 meters per second; while gradually moving away from the spacecraft, "Tianwen-1" with the national flag is taken from near to far. Considering that the camera may turn over as it gradually moves away, the development team designed the camera as a dual-camera to ensure that the camera can capture as many spacecraft images as possible during the turning process..."
"...The separation device enables the camera to "differentiate"; the use of color imaging, with two resolutions of 800×600 and 1600×1200, allows the image to be “clearly captured”; the use of super-strong WiFi communication that can achieve 400 meters of wireless communication allows Data can be "passed back"; the use of disposable batteries that can provide power for longer than 1 hour allows the camera to "stick it" and allows the ground to see the full picture of the "Tianwen-1"..."
"...On October 1, on the occasion of the National Day and Mid-Autumn Festival, the National Space Administration released the flight images of the "Tianwen-1" probe,
and the five-star red flag was shining in space..."