Masonry & gallery widget

Hallo. I use Masonry view and dont crop thumbnails. In this case gallery widget show not correct sizes of pictures. I should set square thumbnails in rtmedia settings for correct pictures in widget. Is it possible to use masonry view in widget?

Please, add RANDOM images in Gallery Widget! And masonry style!

Hi @supergrower,

Yes, it is possible to use masonry view in widget. By default Gallery widget uses fix height and width of all images which is set from widget settings, if you want to images in different sizes you apply height and width CSS property of image to auto.

To view images in random order you can refer this link -> Photos in gallery view order

Thank you for answer. Tell me, please, how apply height and width CSS property of image to auto?

Hi @supergrower,

As per the widget settings, height and width of thumbnail will be fixed in px. You can override that property in your theme’s js file using following code to work with masonry.

jQuery( document ).ready( function ( $ ) {
     jQuery('.widget-item-listing img').css ("height","auto");
     jQuery('.widget-item-listing img').css ("width","auto");
}