Rotate CSS3 or Javascript image

Asked

Viewed 333 times

1

How do I know I have to rotate an image to display it on a page?

I can check this in css or it has to be in javascript?

It is that on Dashboard of a site that I developed the image appears upside down at the time of upload, if I open this image in windows 10 it appears certain more if I open in windows 7 it appears upside down.

So I thought before showing the image on the page check if it is in the right rotation and if I need to rotate it in 90º.

I use React from this dasboard, so the solution has to be in css/html or javascript.

  • I don’t quite understand your problem. Do you want to detect the direction of the image and save it upside down in the upload or display it in Javascript and CSS upside down? Anyway, that sounds like a XY problem. The real problem I think is that you’re getting images that are upside down for some reason.

  • Actually I want to leave the image in the right rotation and not upside down. I need to display it on the page in the right rotation, even if it is in the wrong rotation or if it is upside down I need to display it on the screen correctly.

  • How do you determine whether an image is right, upside down or sideways?

  • 1

    For the record, I recommend reading XY problem, besides fun is enlightening. (coconut water with tank of war)

  • Maybe I haven’t been very clear on my question, but are photos with people when I upload them people get upside down, if I try to upload here on the forum people will be upside down, more when I open the photos in windows with the image viewer it is right. What I want to know is if you can rotate these photos while displaying them on the screen.

  • Your problem isn’t the upload then ? Because you upload the right image and then it gets wrong, you don’t have to rotate it, you have to find out why it’s turning. You understand ?

  • You can do this with CSS, with this link here you will be able to better understand: How to rotate image But the ideal would be to solve the problem of why the images are coming upside down, and so adjust them. Open an editing program like Photoshop with the desired image, and save to web. To better understand, see what’s on this link here: [Why my photos are turning up after Upload](https://www.villehost.com.br/whmcs/index.php?rp=/Knowledgebase/336/Why-my-photos-est

  • Dear @user7726 recommend this https://answall.com/a/170492/3635

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.