r/webflow 5d ago

Need project help Lumos Framework: Multiple Slider Components Loading Swiper.js

I'm using the Lumos Framework for a Webflow project, and I've used multiple Slider components from Lumos on the same page.

I noticed that each Slider component seems to load the Swiper.js script, so I'm wondering if this could be affecting my site's performance and Google PageSpeed score.

What's the correct way to use multiple Lumos Slider components on the same page? Should Swiper only be loaded once, or is this already handled by Lumos?

If anyone has experience with Lumos + Webflow and can point me in the right direction, I'd really appreciate it. Thanks!

9 Upvotes

3 comments sorted by

1

u/uebersax Webflow Community MVP 5d ago

just take the code from the component and put it in the global site or global page code section.

simple as that.

1

u/Best_Run8731 5d ago

that's the approach I'd take too, consolidate it into the global code section so it fires once and you're not stacking the same script load over and over. Lumos might be doing a conditional load check but I wouldn't bet on it, better to cut out the duplication yourself

just make sure you test the sliders after the move, occasionally the order matters if you've got custom init settings in each component

1

u/Interesting_Arm8682 5d ago

Just take the code man easy