The best way is to upload the photo on Wikitree; therefore you must change in the edit section of a profile, on the right hand side is an button add image. Push the button and follow the instructions, then you have uploaded a photo to Wikitree.
If you want to add the photo on G2G, you must copy the the link of the photo on Wikitree, then go to G2G answer or question and push the button with the photo; pate the copied link into the box under URL. That's it.