Used user-profile.tpl.php to customize user profile page.
Need to use a custom template when accessing urls like ‘user/3/photo’ or ‘user/5/photo’.
How to use multiple user profile templates based on path / url in Drupal 7? What name should I use for the template?
I’m not sure what module you’re using to generate the ‘user/X/photo’ pages, so it’s difficult to tell you exactly what template file to use. However, when in doubt about how to theme something in Drupal, install the Theme Developer module. It will allow you to see what theme file or function is currently outputting a specific page or area of the page, as well as what files or functions can be used to override it. See the screencast for more detailed information.