Hi, I upload an image that was taken in portrait orientation to the database files(using FileDB__files_upload_service) and get a url back. When I click the image url in the browser, the image looks fine. If I try to import it to my app, it almost always flips 90 degrees to be in Landscape orientation no matter how/where it's being used.
Have you ever heard of this happening before? Do you know of any solutions?
It happens with every picture that's in portrait orientation. I'm using the ionic app.
For example, this is an image url that's saved in the db and I import to the app:
Image
I have an image placed on a page that has the link above imported to $scope.user.image_url via REST.
On the image I use ng-src {{user.image_url}} attribute.
I also used this code to check the dimensions of that picture and it shows that the image has been rotated in the logs:
var img = new Image();
img.onload = function() {
console.log(this.width + ' ' + this.height);
width = this.width;
height = this.height;
console.log($scope.user.image_url);
console.log("height = " + height);
console.log("Width = " + width);
}
The height should be greater since the picture is in portrait orientation but the logs show it to be lesser. 3000 2250 is logged for Width x Height.
This is a different place that it is displayed using the url directly from the service response of the db File upload.