Exif orientation issue #533
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Does ng2-file-upload have an option to apply exif orientation on the client side? When a photo is uploaded from the iPhone, it is always rotated 90 degrees. Not sure if there is a workaround for this issue. Any suggestions would be appreciated.
I have the same issue when files are uploaded. Is this a bug?
The same issue here
Does anybody found the fix for this issue? I'm with the same problen.
Regards.
I have managed to rotate the image using blueimp-load-image library:
npm i blueimp-load-image.angular.jsonfile:Or alternatively, you can include just necessary parts which should result in smaller bundle size:
Thanks @livthomas This worked perfectly!
@livthomas can u add the 4th step, which is how to use this function, do you override the
fileitem._file? if yes, why would you convert this File to a Blob ?@mzane42 Sure, I use it like this to show the image which is being uploaded:
And
freeImageObjectUrlused in the code above is another of my util functions:HTMLCanvasElementhas onlytoBlobmethod and notoFile. That's the reason why return value type isBlob.@livthomas Thanks for your fast reply, you're awesome man \o/
Thanks @livthomas
I have this same problem. I have tried to implement the fix you propose, but something I am not doing well.
After step 3, what do I have to do to finish implementing it?
@amartinezg2001 You just need to create an object URL, pass it to Angular DOM sanitizer and then use the result as an image source URL in your template. I explained that in my previous comment.
But it's been a year since I posted it here and new versions of both libraries were released in the meantime so there's a chance something has changed and it doesn't work anymore.