okfde / jh-lauch-theme

Das neue Wordpress Theme für Jugend hackt
GNU General Public License v2.0
2 stars 4 forks source link

Lazy loaded images break isotope calculated layout #94

Open pajowu opened 4 years ago

pajowu commented 4 years ago

On the projects page (and possibly others) all images have loading="lazy" set. Isotope calculated the layout after the page is loaded (and 1 second and 5 seconds after that). Because the img tags do not have a height set and are lazy loaded, their height is assumed 0. When the user scrolls down, the images are loaded but the layout is not recalculated by isotope, leading to results like the following:

2020-05-07-171428_979x651_scrot 2020-05-07-171347_1814x944_scrot