I am uploading the image in file upload control on change event then image is automatically rotate see in preview tag in my asp.net mvc c# but I am upload the existing image upload it's good but I am click the image in iPhone then image are upload that time image is rotate. This below code is used for the preview image.
This is my file upload control
<img id="PreviewImage" class="mb20" width="300" src="../@Url.Content(@Url.Content(Model.ProfileImage))" />
@Html.TextBoxFor(model => model.UserFileUpload, new { type = "file", onchange = "ShowVehicleImagePreview(this)" })
this is my function
function ShowVehicleImagePreview(input) {
if (input.files && input.files[0]) {
var readervehicle = new FileReader();
readervehicle.onload = function (e) {
$('#PreviewImage').prop('src', e.target.result).width(300);
};
readervehicle.readAsDataURL(input.files[0]);
}
}
Any one have the idea about this issue?