Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not loading correctly, but it does some times, grr #1196

Open
StuartClickReturn opened this issue Mar 18, 2024 · 3 comments
Open

not loading correctly, but it does some times, grr #1196

StuartClickReturn opened this issue Mar 18, 2024 · 3 comments

Comments

@StuartClickReturn
Copy link

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?

@autoantwort
Copy link

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.

@Luckyfella73
Copy link

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

@autoantwort
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants