Gallery app image orientation issues

Hi,

I am using ownCloud server 10.0.10 and Gallery app version 16.1.0.
When I view photos using the gallery app, some of the photos are not oriented properly. For example, some of the photos I took in portrait mode are rotated by 90 degrees.

I also noticed the following errors when I checked the owncloud.log file:

{“reqId”:“t5L4Qw4ffUiAsnfZPTsD”,“level”:3,“time”:“2018-10-19T04:16:54+00:00”,“remoteAddr”:“xxxxxx”,“user”:“yyy”,“app”:“PHP”,“method”:“GET”,“url”:"/index.php/apps/gallery/thumbnails?ids=13905%3B13909%3B1176%3B1164%3B1363%3B1199&scale=1.5&square=1&requesttoken=ERssJn0IeWwCPxUTQiUacxIFZgZSMzdUeC0oRjIlKSM%3D%3AdhZl4oIG6xzY6gx1T33l0pT92FOsxQynjAhS1QLMZos%3D",“message”:“fopen(/media/drive/owncloud/yyy/thumbnails/1199/300-300.png): failed to open stream: No such file or directory at /var/www/html/owncloud/lib/private/Files/Storage/Local.php#298”}

This message appears several times whenever the gallery app is loading thumbnails.

My data directory is on an external hard disk mounted on a linux server. I checked the permissions on the folders and they seem fine.

Any help on this is appreciated. I tried searching around in these forums and on the web but could not find any useful pointers on how to fix this.

I have previously tried uninstalling the gallery app, deleting the thumbnails from the thumbnail directory, etc. However none of them seem to work.

Thanks in advance!

same here
tried for one day to fix it
opened a bug