The code below allows us to add a WordPress user profile custom picture.
This code can be useful for users that don’t have an Avatar.
You can use conditional logic to check if the user has an avatar or not and then if not you can get user meta ‘image’ and display on your posts page.
The script profile-image.js is only enqueued on the respective page user-edit.php, that also applies for the media-upload and Thickbox scripts, this procedure will avoid any possible scripts conflict on your WordPress admin area.
If you have any problems or questions please contact me.