Use wp-content

[THIS IS PRELIMINARY DOCUMENTATION AND CURRENTLY UNDER REVIEW]

Usage Starting with v9.5 an administrator can now configure the plugin so that it will (try and) save user profile images that it retrieves from Office 365 (through Microsoft Graph) in the WordPress wp-content directory. The other way around it will also try and retrieve these images from the wp-content when serving up WordPress avatars. If left unchecked, the plugin will save to and retrieve user profile images from the WordPress database instead.

Please note that this only applies to installations where the feature to replace the WordPress avatar with an Office 365 user profile image has been enabled (see WP Admin > WPO365 > User Sync > Use O365 Avatar).

The plugin will try to create new folders recursively in wp-content for the path wpo365/profile-images and if successful it will save profile images as png files where the filename represents the user’s (WordPress user) ID. For example, for user admin with WordPress ID 1, the plugin will create the following file: https://www.your-website.com/wp-content/wpo365/profile-images/1.png.

Important By default content in wp-content is not served by WordPress and therefore such content (mostly user uploads) can be viewed by anonymous users. To protect your wp-content folder (or certain subfolders) with the help of the WPO365 plugin please review the following support documentation
https://wpo365.helpscoutdocs.com/article/15-restricing-access-to-wp-content-to-authenticted-users-only.

If the plugin cannot write the received O365 user profile image to the designated folder, it won’t fall back to its default and try to store the image in the database. Instead, it will return the default WordPress avatar for the given user.