This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Masonry custom size

#41782
Ernest MarcinkoErnest Marcinko
Keymaster

Oh you mean you want to have the images in the original widths and then make a masonry layout. I’m afraid that is not possible.
The images are backgrounds for the items, therefore the space is not filled (and is not fillable), so there is no way to determine the image width/height to use it in a ratio calculation.
That is only one part of the issue, the other is, that the items widths are calculated based on the given width/height ratio by the masonry script, so they always follow that ratio.

You could force the images to fit into the predefined containers with this custom CSS:

.asp_item_overlay, .asp_image {
    background-size: contain !important;
}

However I don’t think that will look very nice.