Well as you are using autolayouts, first define an outlet with your image height constraint will called imageHeightConstraint
and then modify your code with this one
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingImage:(UIImage *)image
editingInfo:(NSDictionary *)editingInfo {
float aspectRatio = image.size.height/image.size.width
self.imageProfile.contentMode = UIViewContentModeScaleAspectFit;
self.imageProfile.image = image;
[self.imageHeightConstraint setConstant: self.imageProfile.frame.size.width * aspectRatio];
[picker dismissViewControllerAnimated:YES completion:nil];
}
EDITED
this is my code
#import "ViewController.h"
@interface ViewController () <UINavigationControllerDelegate,UIImagePickerControllerDelegate>
@property (weak, nonatomic) IBOutlet UIImageView *imageProfile;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imageConstraintHeigth;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (IBAction)selectImage:(id)sender {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:picker animated:YES completion:NULL];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(nullable NSDictionary<NSString *,id> *)editingInfo{
float aspectRatio = image.size.height/image.size.width;
self.imageProfile.contentMode = UIViewContentModeScaleAspectFit;
self.imageProfile.image = image;
//this if you need adjust heigth according to width
[self.imageConstraintHeigth setConstant: self.imageProfile.frame.size.width * aspectRatio];
[picker dismissViewControllerAnimated:YES completion:nil];
}
@end
and this are my constraints 
I hope this help, for me works just fine