We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36686
    • 165 Posts
    When I upload an image to a gallery using the Gallery add-on the image is automatically rotated from portrait to landscape(!) How can I stop this from happening?

    MODx Revolution 2.0.5-pl
    Gallery 1.3.0
      • 36686
      • 165 Posts
      Sorry for bumping this, but I'm getting desperate... sad
        • 1778
        • 659 Posts
        I'm not any kind of expert in Gallery but my first thought is , try to update your MODx install to the last version, a lot of bugs have been corrected since 2.0.5pl, and a lot of new features appeared, the code has been cleaned etc...

        It should be enough to solve your problem...
        Cheers
          • 36686
          • 165 Posts
          That's what I thought too, so yesterday I upgraded to 2.1.3 (and managed to crash the entire site so I ended up doing a fresh install), so I now have the latest versions of both MODx Revo and Gallery. Still same issue...
            • 37047 ☆ A M B ☆
            • 309 Posts
            This is just a hunch, but have you checked to see if the images you're uploading are actually the right rotation to begin with? I ask this because I know that on Windows at least, there are situations where you have images from camera phones or digital cameras that were shot as portrait, but present as landscape once imported to your computer; from there you can choose to "rotate" portrait images so they will be viewed properly in the Windows viewer, but they haven't REALLY TRULY been rotated... Windows thinks it's being clever and showing you the image how you want to see it without altering the file. So then when you upload it somewhere else it reverts to its actual orientation. Hope this makes sense... And maybe helps?
              Lucy Iannotti
              Following Sea design & development
              http://www.following-sea.com
              New Bedford, MA
              • 36686
              • 165 Posts
              Appreciate the suggestion, but the images are definitely the right way around when I upload them. It's when I upload the image it's rotated 90 degrees (but only portrait images - landscape images are fine).
                • 36686
                • 165 Posts
                Actually.... I just realised it doesn't happen if I make the image smaller before uploading it! So it's to do with the file or pixel size...!!?
                  • 37047 ☆ A M B ☆
                  • 309 Posts
                  Have you tried saving the images larger or the same size and uploading them?
                    Lucy Iannotti
                    Following Sea design & development
                    http://www.following-sea.com
                    New Bedford, MA
                    • 32316
                    • 387 Posts
                    I think Gallery is not rotating images when perhaps it should based on exif data, except that I think Gallery is correct in this behavior and actually Gallery has nothing to do with this it is the browsers and any server side image processing that would be responsible - IMHO images should resized and rotated before uploading for best results.

                    I think lucy's hunch is right
                    This is just a hunch, but have you checked to see if the images you're uploading are actually the right rotation to begin with?

                    One piece of the the exif data is rotation - many cameras can sense which way you are holding them and set the exif rotation value accordingly - this is fine if the viewer knows what to do with this. A web page does not know - in fact it probably does not even see the exif data. When you resize the photo the software you are using probably uses the exif data to save a smaller file in 'the correct rotation.
                      • 37210
                      • 131 Posts
                      I'm having the same issue. It's never happened before on other websites.

                      I'll keep doing further research and testing to try and figure this out.