Masonry shows photos one below another


I have setup rtmedia along with buddypress. Enabled masonry grid but it shows all the images one below one.

Below is the setup

Use lightbox to display media–>ON
Number of media per page-10
Enable Masonry Cascading grid layout –>ON
Enable Masonry Cascading grid layout for activity –>ON
Number of media items to show in activity stream-10
Type->Only Photos
Sizes–>for some reason the size mentioned in medium are used in activity grid. If i change in medium, these are impacted in activity images.

Please help.


In the inspect element it shows left margin is always determined as ‘0’.
I have installed a different theme. This is causing the issue. Works fine in the standard theme with buddypress.

@pranalipatel Could you please assist in this. How i can fix this in my theme. Will be great help.