Fix user photo upload.

The endpoint was not being passed properly to the included template

Fixes #1468