fix getting extension from photo

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