• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

As designed Rotating images


After a recent import to XFMG latest version a lot of the images were rotated. No big deal and probably to do with the users fixing their rotation before upload to the old system but not knowing there was something in the image that could trigger an automated turn on some systems.

So, I have attempted to start to rotate them back to their correct state but I straight away found that the first image seemed to double in size when I did that. I can see no way for me to correct that other than to turn it back around to how it was. I can't see a way to fix this by doing things like downloading the original and uploading it to the same photo as a replacement, nor a way to regenerate the medium sized image from the full size one. So I have come to a halt.

To check it was not specific to my system I have uploaded the photo to the test area here. This is a link to it: https://xenforo.com/community/media/testing.1058/

If turned upright as it should be it seems to double in size. Turn it back on its side and it seems to be fine, though that means the image shows water dripping sideways.

Seemed best to report this, hope it helps.


Chris D

XenForo developer
Staff member
There isn't anything that would actually double it in size.

I think I understand what you're describing though and it would be as designed.

The image you uploaded is very wide and not very tall (before rotation). We only allow images to have a max width of 100% (otherwise they'd break out of the container).

So when you rotate this image so it's now very tall but not very wide it may appear larger, but it is basically the expected effect.
I had a feeling you might say that... :)

I believe the image is a bog standard one that could be from an iPhone or any camera turned on its side to take the shot.

This is the neat looking image before the corrective turn:


This is what I think most members would expect to get from turning it, much as they see when turning images in Photoshop or whatever:


This is what XFMG is displaying to me after the turn though. A double the width view that I think looks a bit yucky myself - but I do understand what you are saying and why:


Trying to guess at what might improve this, perhaps a setting for those who want it to set the max size of the longest side on medium size photos or something.

Thanks for your speedy reply anyway, and please forgive me if I ask the odd daft question as I get to grips with XFMG.


Chris D

XenForo developer
Staff member
The thing is, that's the actual size of the image:


It is actually displaying much smaller in the gallery than it actually is. Comparing it to how it might look in Photoshop wouldn't really be appropriate. Photoshop allows you to zoom in or out of an image accordingly to make it easier to work with. That said, we do already implement a lightbox which does constrain the image to a maximum height - that would probably be the most appropriate size for viewing an image of this size. Really, this is definitely working how I would expect it to.
this is definitely working how I would expect it to
Yes as I say, I quite understand. It isn't a bug its the way it is designed to display etc. I accept that totally.

Sorry I originally thought it was, the doubling of the width etc. caught me by surprise.

Once I understood that I then meant to explain in my follow up that I thought that photo looked a little yucky that way, as I expect you agree, and that an option in the future sometime to constrain the size of the medium images so there is an option to have them not do that might be very welcome. Once I am more used to XFMG I will try and make some proper suggestions in the right place.

My mention of Photoshop was just as an industry example of how photos tend to be presented and turned and displayed. I think all online photo systems I have ever used offer to do it that sort of way for their medium size images. The system I just upgraded from to XFMG displayed that photo in its medium size view as this:


The full size image is another option and you have that covered, and you have the download option too. All great and I like it all lots.. I just worry when a good looking image looks yucky like that. I feel the same about always having square cut outs for thumbnails. Either I'll have to get used to it all in time or you will add options in some later version to set other display types for medium images and thumbnails. I'm sorry I troubled you and I've used up enough of your time on this and I'm very happy with XFMG - it is vastly better than my old software. I better get back to turning all those images that are on their sides again now...:)



Chris D

XenForo developer
Staff member
No need to apologise, it has gotten me re-thinking a few things (though this would be longer term, e.g. XFMG 2.0 level changes) and also reminds me of some ideas I had early on in development that I never got around to implementing. It was worth posting.

As a shorter term solution, you could look at playing around with some simple CSS:
.mediaContainer .imageContainer img {
    max-height: 550px;
Adding something like this to your EXTRA.css template may help, though it isn't perfect.
Thanks Chris, that does fix that image up quite nicely. I guess displaying the new smaller image in the middle of the available space rather than on the left would be the only other thing I'd probably consider.

I tried guessing at a position command to add but I think I need to study such commands for XFMG a little more.

Any new options you decide upon being in V2 would do me fine. I'm sure myself and others here will have lots of suggestions to make for that yet. I'm starting to wonder about things like backups and how best to make them, and then how to turn the backups back into photos if needed and so on at present... I expect I'll have lots of questions/ideas to mention as I get used to your very neat software.