Answers.Body: <p>The field name used for the user photo has changed to <code>photo</code>, so the bare minimum change to make this work is modifying<br>
  <code>&lt;input type="file" id="userPhoto" name="userPhoto" value="Upload"&gt;</code><br>
  to be<br>
  <code>&lt;input type="file" id="userPhoto" name="photo" value="Upload"&gt;</code></p>
  
  <p>You'll probably want to use transforms, when outputting that image, too.</p>
  
  <p>Also, I'd stick with <code>currentUser.photo</code> or <code>currentUser.getPhoto()</code>, instead of using a hybrid <code>currentPhoto.getPhoto</code>, but that might just be me.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-24T15:43:12.890Z
Answers.Text: Great, thank you so much! Did you find that in the documentation? I couldn't seem to find it there.
Answers.UserDisplayName: Brianne Hostutler
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-25T09:45:48.490Z
Answers.Text: I just took a short trip through Craft's code to see what field name it's looking for.
Answers.UserDisplayName: Andris Sevcenko
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-24T05:24:02.797Z
Answers.LastActivityDate: 2018-01-24T05:24:02.797Z
Answers.UserDisplayName: Andris Sevcenko
Body: <p>How do I allow logged in users to change their user photo on the front end in Craft 3? </p>
  
  <p>I am creating an "Edit Profile" page and I followed the answer to <a href="https://craftcms.stackexchange.com/questions/1011/allow-user-to-change-or-delete-their-photo-for-their-profile-from-the-front-end">this question</a> for Craft 2 to create a form updating to Craft 3 syntax where necessary (code below). When I submit the form, the text/textarea fields get updated, but the image does not. Can anyone point me in the direction as to how to get this working?</p>
  
  <p>Thanks in advance!</p>
  
  <pre><code>      &lt;form method="post" enctype="multipart/form-data"&gt;
          {{ csrfInput() }}
  
          &lt;input type="hidden" name="action" value="users/save-user"&gt;
          {{ redirectInput('users') }}
  
          {% macro errorList(errors) %}
          {% if errors %}
              &lt;ul class="errors"&gt;
                  {% for error in errors %}
                      &lt;li&gt;{{ error }}&lt;/li&gt;
                  {% endfor %}
              &lt;/ul&gt;
          {% endif %}
          {% endmacro %}
  
          {% from _self import errorList %}
  
          &lt;input type="hidden" name="userId" value="{{ currentUser.id }}"&gt;
  
          {% if currentUser.getPhoto != '' %}
              &lt;img src="{{ currentUser.getPhoto.getUrl }}" alt=""&gt;&lt;br&gt;
          {% endif %}
          &lt;input type="file" id="userPhoto" name="userPhoto" value="Upload"&gt;
  
          &lt;label for="firstName"&gt;First Name&lt;/label&gt;
          &lt;input id="firstName" name="firstName" value="{{ currentUser.firstName }}"&gt;&lt;br&gt;
  
          &lt;label for="lastName"&gt;Last Name&lt;/label&gt;
          &lt;input id="lastName" name="lastName" value="{{ currentUser.lastName }}"&gt;&lt;br&gt;
  
          &lt;label for="bio"&gt;Bio&lt;/label&gt;
          &lt;textarea id="bio" name="fields[bio]"&gt;{{ currentUser.bio }}&lt;/textarea&gt;
  
          &lt;label for="password"&gt;Password&lt;/label&gt;
          &lt;input id="password" type="password" name="password"&gt;&lt;br&gt;
  
          {% if account is defined %}
              {{ errorList(account.getErrors('password')) }}
          {% endif %}
  
          &lt;input type="submit" value="Save Profile"&gt;
      &lt;/form&gt;
  </code></pre>
  
Tags: <users><craft3><upload>
Title: Craft 3: Upload user photo from front end
ThreadText: # Craft 3: Upload user photo from front end
  
  (Asked by: username_0 on 2018-01-23)
  
  How do I allow logged in users to change their user photo on the front end in Craft 3?
  
  I am creating an "Edit Profile" page and I followed the answer to [this question](https://craftcms.stackexchange.com/questions/1011/allow-user-to-change-or-delete-their-photo-for-their-profile-from-the-front-end) for Craft 2 to create a form updating to Craft 3 syntax where necessary (code below). When I submit the form, the text/textarea fields get updated, but the image does not. Can anyone point me in the direction as to how to get this working?
  
  Thanks in advance!
  
  ```
        <form method="post" enctype="multipart/form-data">
          {{ csrfInput() }}
  
          <input type="hidden" name="action" value="users/save-user">
          {{ redirectInput('users') }}
  
          {% macro errorList(errors) %}
          {% if errors %}
              <ul class="errors">
                  {% for error in errors %}
                      <li>{{ error }}</li>
                  {% endfor %}
              </ul>
          {% endif %}
          {% endmacro %}
  
          {% from _self import errorList %}
  
          <input type="hidden" name="userId" value="{{ currentUser.id }}">
  
          {% if currentUser.getPhoto != '' %}
              <img src="{{ currentUser.getPhoto.getUrl }}" alt=""><br>
          {% endif %}
          <input type="file" id="userPhoto" name="userPhoto" value="Upload">
  
          <label for="firstName">First Name</label>
          <input id="firstName" name="firstName" value="{{ currentUser.firstName }}"><br>
  
          <label for="lastName">Last Name</label>
          <input id="lastName" name="lastName" value="{{ currentUser.lastName }}"><br>
  
          <label for="bio">Bio</label>
          <textarea id="bio" name="fields[bio]">{{ currentUser.bio }}</textarea>
  
          <label for="password">Password</label>
          <input id="password" type="password" name="password"><br>
  
          {% if account is defined %}
              {{ errorList(account.getErrors('password')) }}
          {% endif %}
  
          <input type="submit" value="Save Profile">
      </form>
  
  ```
  
  **Tags:** users, craft3, upload
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-01-24. Score: 1 | Accepted answer
  
  The field name used for the user photo has changed to `photo`, so the bare minimum change to make this work is modifying  
  `<input type="file" id="userPhoto" name="userPhoto" value="Upload">`  
  to be  
  `<input type="file" id="userPhoto" name="photo" value="Upload">`
  
  You'll probably want to use transforms, when outputting that image, too.
  
  Also, I'd stick with `currentUser.photo` or `currentUser.getPhoto()`, instead of using a hybrid `currentPhoto.getPhoto`, but that might just be me.
  
  > **Comments:**
  > **username_0**: Great, thank you so much! Did you find that in the documentation? I couldn't seem to find it there.  
  > **username_1**: I just took a short trip through Craft's code to see what field name it's looking for.  
  
  ---
  
  