Some portrait images turn to landscape when preview is made

Hi. I uploaded a portrait image in a region, and when I saved it and returned to layout page, saw that it turned to landscape.
why is that? can anyone help me?
this is the image:

Have you looked at our guide that goes through the steps on how to change the screen orientation for Players: How to change the screen orientation for your Xibo Players ?

It is not screen orientation issue. Just xibo decides that this portrait image been saved as landscape (I even checked in server library) and so been showed as landscape in previews and in clients. Other medias are all ok and everything else is working

I’ve tried the image you provided and that works as expected, although I suspect uploading it to Community may have made changes to it.

Xibo does not do any processing on the image and will show the image as it is saved. Some cameras and phone camera apps will store portrait images as landscape, with an EXIF metadata flag saying that it should be displayed rotated. Those kinds of images will show as landscape in the CMS since that is how the image is actually saved in the file.

In that case, you’d need to open the image, rotate it, and save it before uploading in to Xibo for it to show up as portrait.

This of course may not be the original image that you used, and it may have been processed in the upload to the community, so please do pass on the original if you would like us to take a further look.

I’ve tried to zip and send it, but is not allowed here. how else could I pass the original one?

You can upload to here: and paste the link here or to me direct, whichever you prefer.

Thank you
That’s it:

Thank you for providing the image file.

Looking at the image details, the image would need to be rotated before uploading to the Xibo CMS as it shows the following dimensions for a landscape image:


The rotated file can be found at the following link: which if you look at the image details will now show the following dimensions to display as a portrait image:

There are tools available that will take a directory full of images and automatically rotate them based on EXIF

On Linux, you can use exiftran: exiftran -a -i *.jpg

Windows has which is untested by us, but gives you an example of what is available to handle batch rotations.

irfanview batch function may do that too:

I hope that is helpful to you.

Actually I find something else. in getResource function of widget/Image.php, I changed
$img = Img::make($filePath);
$img = Img::make($filePath)->orientate();
and that automatically fix the issue. Rotate if needed, otherwise the original file.
What is your opinion?

1 Like

We can certainly record it as a Feature Request, but generally speaking user feedback is that we shouldn’t do any processing on uploaded items.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.