masonry icon indicating copy to clipboard operation
masonry copied to clipboard

not loading correctly, but it does some times, grr

Open StuartClickReturn opened this issue 1 year ago • 3 comments

Hi there

My grid keeps loading with half the picture on top of one another, and cannot understand why? https://newtopia1.wpenginepowered.com/artwork/

when you resize the window the grid reconfigures perfectly, why can it not just load right the first time...

im confused where i have gone wrong it looks like this --> https://newtopia1.wpenginepowered.com/wp-content/uploads/2024/03/Screenshot-2024-03-18-at-23.18.23.png or this --> https://newtopia1.wpenginepowered.com/wp-content/uploads/2024/03/Screenshot-2024-03-18-at-23.03.36.png

help?

StuartClickReturn avatar Mar 18 '24 23:03 StuartClickReturn

I have the same problem. Have you found a solution?

I guess the problem is that the layout is computed before the images are loaded and therefore the initial height that is not the final one is used.

autoantwort avatar May 14 '24 16:05 autoantwort

Providing the JS you use for setting up the masonry would be good.

Do you use imagesLoaded? That is the recommended way to make sure the images are loaded before doing the layout-math.

See documentation (scroll down to imagesLoaded section): https://masonry.desandro.com/layout

Luckyfella73 avatar Jun 07 '24 10:06 Luckyfella73

Yeah this was the problem/solution for me: https://masonry.desandro.com/layout#imagesloaded

autoantwort avatar Jun 07 '24 12:06 autoantwort