HTTP error when Uploading an image

ajax.php is loading over HTTP when uploading an image on BuddyPress profile causing HTTP error and images can't be uploaded