1. Find a photo you want to use and store it on your computer, OneDrive, or other location you can get to. The photo needs to be smaller than 4 MB and can be a .png, jpg, or .gif file.
  2. Sign in to Office 365 with your work or school account at portal.office.com
  3. Select the circle in the upper right hand corner of the page that shows your initials or an icon of a person.  

    Section of the header with the default photo image

  4. In the My accounts pane, select the circle that shows your initials or an icon of a person. Change your photo in the pop-up that appears.

My account pane with a photo circle showing a hover state with camera iconScreen with an option to change your profile photo


Reference: https://support.office.com/en-us/article/add-your-profile-photo-to-office-365-2eaf93fd-b3f1-43b9-9cdc-bdcd548435b7