How do I resolve the image rotation and image cutting issue in Laravel?
Asked Answered
P

0

0

enter image description hereenter image description here

I have an already developed a Laravel web app. I've just discovered that whenever I upload an image taken from a mobile phone it rotates and if the image px is bigger than the containers then the image is cut partially as I have kept overflow as hidden. I have heard of the image intervention package but i don't know how to apply it to my app, if there is any other way to resolve then issue without any additional package then that would be of great help.

profile-avatar{
    width: 420px;
    height:700px;
    overflow: hidden;
    display: inline-block;
    background-size: cover;
    background-repeat: no-repeat;
    background-position:top-center;
}

the above given is my css code if anyone wants to help and want any other code of mine then please tell

Parrisch answered 15/12, 2019 at 3:18 Comment(16)
Can you share the project link ? I want to see the problem on live.Thinia
well i am adding the screenshots of the problem aboveParrisch
i.sstatic.net/BQMJe.jpg this is how the image is seen after uploadingParrisch
i.sstatic.net/aXsfo.jpg this is how the image was takenParrisch
@Abdullah Al MamunParrisch
Are you sure that it's not a problem with the camera app? I mean it's a common issue with camera apps on android at least.Promulgate
Can you share your image upload code ? @Jeffrin JoseThinia
i am using iphone 7+ my co developer has a android phone in his phone it is working fine and when i upload using my phone this issue is comingParrisch
@Promulgate this is coz of ios and do u think there is any solution for thisParrisch
@Abdullah Al Mamun u want my controller code or the image displaying codeParrisch
this issue is only found on ios devicesParrisch
medium.com/thetiltblog/…Renowned
@JeffrinJose some android devices have this issue as well. You need to identify if the image is rotated and rotate it back to the correct orientation.Promulgate
@jeffrin-jose I think this error occurs for your device. You can upload image from pc or laptop to check it.Thinia
While uploading from desktop devices its working fine its even working fine with android the problem is with ios devices@Abdullah Al MamunParrisch
https://mcmap.net/q/1482870/-how-to-resize-image-and-reorient-it-if-it-rotates-when-uploaded-through-ios-devices-using-image-intervention-package/12424555 @Abdulla Al Mamun please see this question of mineParrisch

© 2022 - 2024 — McMap. All rights reserved.