fix getting extension from photo

This is basically a test of whether I can relatively painlessly cherry-pick a single commit into single single pull request. This may not be a valid change, but it looked like maybe a minor copy/paste bug.