Home>Support>Simple Masonry image height wrong in initial page load

Simple Masonry image height wrong in initial page load

Refering to this topic:
https://wordpress.org/support/topic/bug-simple-masonry-wrong-calculation-of-margin-if-image-is-not-fully-loaded/

In my case, I have Simple Masonry plugin with 4 columns and two rows. I place three images: first one taking 3 columns and 2 rows. Two others taking one row and one column each. The latter images are rendered incorrectly after initial page load, the height is calculated wrong and I can see only portion of the images. When a browser page is resized the images are shown correctly.

Looks like that $img.height() is calculated wrong right after page load. The link above offers other solutions, but they didn’t work. My workaround was to delay resizeMasonry() function in simple-masonry.js. Like this:

window.setTimeout(resizeMasonry, 500);
/*resizeMasonry();*/

Works ok, but maybe you could fix this in a future release?

Thanks!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 11 months ago Alex S
    Hi, I Work Here

    Hi More,

    Thanks for letting us know about this. I’ve logged this as a bug in our issue tracker. We’ll investigate this as soon as possible and try come up with a fix.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More