Wrong Image orientation

I have an image which was taking in portrait (when i open it, it is in portrait mode) but when I display image using src its displayed as landscape
any idea what am I doing wrong ?

I had a similar problem (outside of an Ionic app though) whereby taking a photo would result in random orientation. turns out it’s not random - check out https://github.com/exif-js/exif-js which has tools to correct the orientation of images when stored in memory before writing to device / uploading to a server.

yes your right its exif causing the issue.
anyways I was able to resolve with canvas.

Hi All

I have a similar problem, I get picture with camera plugin, then I move the pic in a persistent storage with File.moveto(), but I see the image rotated in img tag.

Can you share your code that figures it!

Than you

I can’t figure out the solution presented. could you make it simpler? what is canvas?


Camera.getPicture() accepts a parameter called “correctOrientation”. If set to true, the resulting image will have the correct orientation instead of storing orientation in EXIF metadata. I just tried it on Android.


Help me to resolve with canvas . Im drawing image using canvs but getting rotated on some devices

Have you resolved your problem ? though it is late I’m still facing the same problem.

This is the solution for me. Thank you