Drupal Save Profile Image Programmatically

When we use the Profile 2 module and need to save the profile image field (existing), we can use profile2 functions and achieve the task. Note down the Field needs to be updated. Load the profile. Add Image field to the loaded profile object Save the profile. function save_image_profile2($profile_id, $image_id){ // Load the profile objectcontinue reading