ng-file-upload icon indicating copy to clipboard operation
ng-file-upload copied to clipboard

Portrait Image get auto rotates in iphone

Open thisisirfan opened this issue 7 years ago • 8 comments

Once i upload portrait image using my iphone, image get auto rotate to left. it only happens in iphone, working fine on android devices. I have tested in safari and chrome both. Here is the code i am using to upload image. <input id="multi-file-upload" class="fa fa-camera" type="file" accept="image/*" mimage="images" multiple resize-max-height="{{ config.height}}" resize-max-width="{{ config.width}}" resize-quality="{{ config.quality}}" />

thisisirfan avatar Mar 06 '17 06:03 thisisirfan

I am facing same issue. is there any update on this?

darjidipal31 avatar Mar 28 '17 07:03 darjidipal31

@darjidipal31 still couldn't resolve the issue.

thisisirfan avatar Mar 28 '17 11:03 thisisirfan

@darjidipal31 @thisisirfan any update on if you managed to solve this issue?

garmeeh avatar Sep 14 '17 09:09 garmeeh

@darjidipal31 i have resolved this issue by resolving exif orientation issue. I have used this library to resolve it https://github.com/blueimp/JavaScript-Load-Image

thisisirfan avatar Sep 14 '17 10:09 thisisirfan

Any update on this issue? Is there any solution that not includes to import another external library? It's happening also on cell phones with Android

federicoruf avatar Nov 13 '18 14:11 federicoruf

Any update on this issue? Is there any solution that not includes to import another external library? It's happening also on cell phones with Android

I have used this library to resolve it https://github.com/blueimp/JavaScript-Load-Image

thisisirfan avatar Nov 13 '18 20:11 thisisirfan

@thisisirfan do you have a code example that solved this issue?

betorobson avatar Dec 10 '18 18:12 betorobson

@thisisirfan do you have a code example that solved this issue? hay man, here is the method i have used to fix the issue: var setPostImg = function(origImage, options, imageResult) { var deferred = $q.defer(); setTimeout(function() { loadImage( imageResult.file, function(img) { return img.toDataURL(); }, { maxWidth: 2000, maxHeight: 2000, orientation: true } ); }, 100); return deferred.promise; }

thisisirfan avatar Dec 11 '18 06:12 thisisirfan