The whole point of a masonry layout is if you have different aspect ratios. Otherwise a masonry layout is just a normal grid.
The whole point of a masonry layout is if you have different aspect ratios. Otherwise a masonry layout is just a normal grid.
Masonry layout fixes one of the dimensions. That means either portrait or landscape images will look visibly smaller than those of the inverse aspect ratio, because their longer side must be the same length as the latter’s shorter side.
Masonry works well if you have different aspect ratios of the same orientation.
Just curious, what algorithm is good for laying out images of arbitrary orientations, sizes, and aspect ratios? That seems like a pretty difficult problem. Some sort of variation of knapsack problem maybe?
You can exploit flexbox for this type of layout: https://bfgeek.com/flexbox-image-gallery/
I dont know what would be the best way, but I personally want each image to be represented correctly in relation to all other image. This means that the way images are laid out will looked jagged. However, as a consequence of that, it is easy to find back to a specific image. Its like when you are coding, you look at the "shape" of the code when scrolling to find that specific function definition etc..
Here is an example of the layout of a photostream that I was satisfied with.
https://frifoto.emilbratt.no/?view_mode=photo-stream&tag=All...