Forums  ›  General  ›  General discussions

Almost every posted photo is sideways

So far every photo has been correctly orientated.

Thanks Deano. I'll keep you informed. It will save me hours of work and less frustration for my members.

That basically just shuts off cheetahs auto rotate and lets the browser do it.

Monitor it for a couple of days and let me know of any issues.


Yippee! That seems to work. For anyone trying it, make sure you clear the caches.


Thanks Deano.

Reason antons mod works is because it does not try to rotate the photo. The browser handles it.

The problem here is its being rotated twice. Once by cheetah, and once by the browser.

I have come up with a fix i would like you to try.

Edit file modules\cheetah\photos\classes\ChPhotosUploader.php

At about line 35 look for this.

$this->bImageAutoRotate = 1;

Change to this.

$this->bImageAutoRotate = 0;

Then in file templates\base\uploader_html5.html

At about line 217 look for this.

FileAPI.Image(file).preview(__preview_size__).rotate('auto').get(function (err, img){

Change to this.

FileAPI.Image(file).preview(__preview_size__).rotate('none').get(function (err, img){


Save and try uploading again.


Oh gosh. As 99% of people take pics with a phone held vertically, I concede this is a big problem. It's interesting that Anton's module seems to get around the problem especially with modern browsers that everyone "should" have by now. See my files folder.

I had to rotate every photo today.

I believe i may have located the issue but it's not going to be easy to fix.

Seems the fileapi plugin in cheetah as well as dolphin rotates the image based on the photos exif data. However, that exif data is not being removed so the browser is also rotating the image based on exif data as well. Seems this has been included with all modern browsers.

The image i tested if the exif data is removed without altering the photos will display the photo rotated counter clockwise 90 degrees. The exif data specifies to rotate CW 90 degrees. So when viewed in a browser it is shown upright. But when uploaded to cheetah, cheetah sees the exif data, and rotates CW 90 degrees but leaves the exif data there. So when the uploaded photo is viewed, the browser also rotates it and it ends up rotated to the right 90 degrees.

I tried updating the fileapi to the latest version and it did not solve the issue. So i will have to solve it myself somehow without messing things up for older browsers or browsers that don't rotate based on exif data.

It will take a while to fix. I am dealing with a 3'rd party plugin as well as modern browsers interference.

Gee. That should read Simple Chat 2.0. By the way, it's a brilliant module. Ask Anton for a discount. Simple Chat is a one-on-one chat with the ability to include photos. I think it's possibly one of the best Modules Anton has created.

For what it's worth, I'm using Anton's Simple Cat 2.0 module and pics are correctly orientated there. He doesn't use the photos module to upload photos, I think Modzzz does.

They're being uploaded to a member's Photos folder using HTML5. I'm the only person who can upload tinymce photos and I reduce them to a very small size using Irfanview first. I've never had a problem.

As I said, I always reduce my photos with Irfanview so I've never had a single problem. It's only when we try to upload photos as taken by the camera. Both the photos I sent you appear correctly in Windows Explorer.

There's a zip file in my files folder called Photos. They're on page 2. Both photos should be vertical format, but when I uploaded them they were landscape. The bookcase is from my phone, the other is from another person's phone.

Also more info.

Are these problem photos uploaded to lets say a forum using the tinymce plugin, or to the photos module using the html5 uploader?

I'll look into it.

It is possible for your to provide me with a couple of zipped up samples that always show up sideways?


Same old problem. I'm constantly having to rotate photos for members and it's driving me mad. So much so, I've been getting members to email me the photos. but guess what? They're all orientated correctly. Some are huge - 3 to 4 meg so I've been resizing them with IrfanView and resaving them. When I upload them, they're always correctly orientated.

However, if I upload the original which is orientated correctly on my machine, it's sideways in Cheetah.

So I thought I'd upload one of my own original vertical phone photos and yes, it was sideways. I've never noticed this before because I always tweak my photos with Irfanview. It seems Irfanview sets the orientation correctly, but Cheetah doesn't.