Your comments

I haven't thought about the performance issue.

A possible solution would be to turn it within the browser, with a small JS script: https://stackoverflow.com/a/32490603/3207406 (for this to work, you will probably need to load it on js and then set the background-image attribute, like this: https://stackoverflow.com/a/34642144/3207406)


I would recommend setting a `data-exif-orientation` attribute based on the result of the call and let the CSS rotate the background using `transform` depending on this `data-exif-orientation` attribute.

I totally understand your point (I am now using ImageMagick on my installation :-).


With ImageMagick activated, all the thumbnails are fine.


However there are still some issues:

- on a shared folder gallery: the fullscreen view is not rotated at all (expect on firefox when I manually add `image-orientation: from-image`)

- on my own gallery, the preview is not rotated

- on my own gallery, the zoomed view is not rotated


This answer seems like a nice trick: https://stackoverflow.com/a/46013100/3207406 (PHP + CSS cooperation)

I confirm that the sorting of the gallery is a bit exotic.


Example on https://demo.filerun.co/ (folder HOME/Photography), if you share it with a "grid view", the pictures appear in alphabetical order. If you share it with "Image gallery" the order seems to be random (https://demo.filerun.co/wl/?id=llfKfGAup788ujUnJh1uxjTDJxyqkLBQ&mode=gallery)