According to the context you provided, that sentence should mean something like this:
I envy the one who took this photo, because s/he could take a photo of such a gorgeous.
的人 = the one who took the picture, i.e. the photographer.
Implied meaning [not accurate at all]:
I am so jealous that someone could befriend with this beautiful lady/handsome man.
Or even worse:
Wow, it is so lucky to be a friend with this gorgeous, aka me ;) [provided that the person in that photo is herself/himself] [This is so pretentious of course, totally a show-off 😂]