desandro / masonry

:love_hotel: Cascading grid layout plugin
https://masonry.desandro.com
16.38k stars 2.11k forks source link

Upgraded to Ubuntu 18.04 and suddently hell broke loose #1070

Closed semyou closed 5 years ago

semyou commented 5 years ago

Hi @desandro ,

I was using Masonry and imagesloaded since 2011. It has worked like a charm for me under Ubuntu 16.04. Now, a month ago, I decided to upgrade my server to Ubuntu 18.04 and all hell broke loose. Masonry is not aligning images properly. It's miscalculating the absolute top position and some images are either overlapping or have a lot of spacing. The problem is only in the vertical. Columns are properly separated. I have upgraded to your latest ImagesLoaded and Masonry but not success.

Here is a screenshot showing you what it looks like when the spacing is the problem.

screen shot 2018-10-28 at 8 36 29 pm

This is a screenshot when they overlap (BTW, you can reload the same page and see both behaviours).

screen shot 2018-10-28 at 8 39 08 pm

Here is the code I use

` <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/masonry.pkgd.min.js"> <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/imagesloaded.pkgd.min.js">

` I would really appreciate your help as I have been losing visitors lately due to the terrible rendering. Thanks,
desandro commented 5 years ago

I'm sorry to see you're having trouble with Masonry. Could you provide a reduced test case? See Submitting Issues in the contributing guidelines.

semyou commented 5 years ago

Problem solved. It was a lazy loading feature of images from Wordpress free CDN (Photon). I deactivated it and the problem is gone. Thank you for teaching me a life saving technique on how to troubleshoot front-end issues. It took me exactly 10min of troubleshooting using your suggested method vs now 2 evenings of scattered efforts of quasi-troubleshooting.