Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • … I wonder if the script is timing out for you. If that is the case, there is a PHP installation variable (your hosting service should be able to help you with that) which defines the maximum execution time for any php script. With that volume I suppose you may be hitting the that limit (just a hunch as I’ve had similar problems with other plugins because of this).

    A work around is to have the javascript itself break down the calls such that it would make a series of sequential calls (say in blocks of 10 as you suggest) back to the server instead of one big one with all of the files.

    (I’m sure there are developers here quite able to put it together… I might even give it a go when I get some free time)

    My code should by no means be taken as reference (haven’t taken the time to optimise it and make it completely generic) but I had the same problem.

    My wordpress site isn’t ready to go live yet but I solved the situation by installing the wc_script_updater plugin and manually changing the Lazyload javascript file to include the function below, and having it called at the end of lazy load’s update() function (every time lazy load updates, it’ll trigger a masonry layout).

    function updatelayout() {
                var container = document.querySelector('#gallery-1');
                var msnry;
                // initialize Masonry after all images have loaded
                msnry = new Masonry( container );
    
                imagesLoaded( container, function() {
                               msnry.layout();
                });
            }

    Hope it helps! … and as I said, I realise that it’s hardly optimised at the moment…

Viewing 2 replies - 1 through 2 (of 2 total)