This is a very very old bug, maybe it could be fixed. If in media Imagick library is checked, any portrait format (vertical) images are rotated to horizontals.  There is a possible fix here, never got into Osclass script: https://github.com/osclass/Osclass/pull/2302