Photo upload optimization