I am working on a migration work to WordPress for a site where all user images of old site has to set as avatars in WordPress buddypress profile.
I wrote a PHP script to migrate all users along with passwords and working fine.
My problem is how to set user avatar using PHP code (not WordPress code). I didn't understand how it is storing and where in tables it is storing. I know the location it is storing be in format like,
wp_content/uploads/avatars/userid/randomtext.jpg
How this randomtext.jpg
is generating and where this information is saving?
Can anyone help me?