xemle / home-gallery

Self-hosted open-source web gallery to view your photos and videos featuring mobile-friendly, tagging and AI powered image discovery
https://home-gallery.org
MIT License
834 stars 64 forks source link

Feature Request: Customize number of thumbnails per row by setting a minimal row height (by percentage e.g.?) #63

Closed onyxogen closed 1 year ago

onyxogen commented 1 year ago

Portrait oriented images (lots of) tend to accumulate in one row (about six images) opposed to landscape ones (about four) The stream should have a customizable row height which in turns leads to fewer images per row if set to bigger values. Especially on my mobile phone you have very small image thumbnails you have to look very closely to recognize.

xemle commented 1 year ago

Currently the fluent algorithm does not care about the image orientation and has only max and min height for a specific width.

As you suggest: The algorithm could be extended that it detects rows with portrait images and use another max and min height. My question is, how many non portrait images are allowed in portrait rows before switching back to the existing algorithm. E.g. allow 1 image, or 20% of width.

What is your suggestion?

onyxogen commented 1 year ago

I'm not sure I understand the question. Could It's not so much about the number of images per row but on the overall size of each one. Though setting a bigger MinHeight would lead to fewer images per row automically. If MinHeight could be 130 % of the current one, it could be a good starting point?

xemle commented 1 year ago

1.9.0 honors image rows with portrait images and uses a higher row height. The higher row height is used if the row has more portrait images than landscape (via image ratio average).

@onyxogen Check demo web gallery and do not hesitate to provide your feedback.

My original assumption for mobile devices was that the view port with is 360px wide. This is not true for modern devices and leads to a smaller presentation of image rows. Further the font unit is px and leads to smaller UI elements.

So while fixing portrait image rows new issues arises. The view port and font issues will to be fixed in future versions to improve the mobile experience.

xemle commented 1 year ago

Closing it due inactivity. Please do not hesitate to reopen it if required.