Hi
There's no difference at all, though "Sur" is the correct way to say it.
"Dans la photo" would work but the grammar is incorrect, and would focus on what's deeply in the picture.
If you tell me "Dans la photo", I would understand, but would be a little bit surprised; make sure you say " sur" ;).