Support thumbnails that preserve original aspect ratio

Several beta users have asked for thumbnails in galleries to not be cropped to squares:

This would be a toggle added in/near the current thumbnail size picker.

(and it looks like flexbox, with a small hack, will do the trick but unfortunately does minor cropping as well)

That link is my favorite method for flexbox/masonry, and can handle a ton of images really well.

This is another example which in theory is high performance, but uses a lot more lines of code:

I’m curious how the method you linked to will handle thousands of images or resizing a window. I think you wrote somewhere else there is lazy loading coming up?

PhotoStructure already uses javascript-based lazy loading for tag galleries and search results: if you see the “load more” button, it’s because that browser doesn’t support the intersection API (mostly old versions of safari).

It must be loading so fast I don’t notice anything lazy about it!

If you open the developer tools (cmd shift I) and click network, and then scroll down, it should show images being fetched.

It eager-loads a screen-height’s worth of images below the current scroll position, fwiw.

(if it isn’t behaving correctly, please tell me!)