Envira Gallery takes a long time to load

Hi, I´m using an Envira Gallery plugin and have created several galleries inserted in accordion tabs (https://clinicanoval.com/galeria/). The problem is that galleries (with only 5 or 6 pictures) take a long time to load (even minutes in some browsers).
Please, can you help me to fix the problem?
Thanks in advance

José M.

Hey,

This article should help you: https://wpengine.com/blog/site-speed-make-wordpress-lightning-fast/

Thank you, but regrettably this article doesn´t help me.
The problem is that galleries inserted in accordion tabs (https://clinicanoval.com/galeria/) take a long time to load in some browsers (even minutes in some browsers like edge o safari).
Those who are inserted in normal pages load correctly in those browsers (you can check it testing that and this page in different browsers: https://clinicanoval.com/clinica-noval-2/)
Is there a conflict between Accordion and Envira Gallery?
In that case, how can I fix it?
What plugin or tool can I use to show galleries in accordion tabs?

Hi there,

It’s because they are hidden within the accordion, they will only start rendering when you open them. And that’s how lazy loading works, and your gallery has it’s lazy loading feature active.

Try disabling the Enable Lazy Loading? option in your grid’s Config section.

Thanks!

Hi,
Thank you. I´ve tried it and after disabling the Enable Lazy Loading? option the first image of the galleries loads very fast, now the problem is that the other images don´t load.

Hi there,

That’s weird, usually, the fix is this

jQuery( function($) {

$(document).on('click','.x-accordion-toggle', function() {

setTimeout( function(){ $(window).triggerHandler('resize.envirabox'); console.log('rendered'); }, 760 );

} );

} );

Something is blocking the even triggering, this jQuery( window ).resize() should work alone, it’s like manually resizing the browser (you can try opening an accordion and resize your window, and it’s going to re-render it again). That code is supposed to emulate the resize action that you’re doing, but it’s not working in Envira Gallery, I suggest using another grid plugin like Essential Grid.

Thanks!

Ok, thank you, I´ll use another plugin.

You’re welcome.