users report that if they upload images in portrait mode, it gets uploaded with the wrong side up
I can confirm the issue while I was watching a user uploading an image and it was indeed wrongly rotated once uploaded
Does anyone have an idea how to debug this or what could be the problem?
Add a random spin button/thingy before image upload as a cool effect to the site that actually does nothing. No one will understand why someone images have rotated lol
Show code
You can listen when the image is rotated with JS
This may help https://stackoverflow.com/questions/18632356/how-to-extract-image-orientation-information-from-image-loaded-in-canvas
Is there a specific event for it? I Googled but didn’t find anything.
Try: document.getElementById('imageInput').addEventListener('change', function(event) {});
It’s nice if this solves the problem rather than using a feature-rich library like the one you mentioned just for this single purpose. (It seems like a good library, though)
input type="file" is literally all there is 😄
I don't understand what you mean
But what should I do with the element?
Listen for change
Обсуждают сегодня