Bonjour Jay !
I'd say the most colloquial way to ask this is the simple:
Quand est-ce que cette photo a été prise ?
Used on its own, how long ago? could be il y a combien de temps ?
However, it would sound a bit clumsy (though not completely incorrect) to use it in a longer question -> Il y a combien de temps que cette photo a été prise ?
I hope that's helpful!
Bonne journée !