June 5, 2017 at 4:32 am #46556
As always, love your theme!
I am building a site for a client that is *very* image-heavy. The client is a photographer and he is using his website as a portfolio for subscribers to his photo content. We are hoping the site can have pages for different “levels” of subscribers, and those levels are password protected (using WordPress’s native password tool). Once on the password-protected page, we want users to have access to all photo content, and the top levels have access to all previous archives, so tons of photos. We are using tabs and toggles to organize the content, and the page load times are LOOOONGGGGG. We are using the FooGallery plugin which is working on a lazy load feature but is not active yet.
Is there a way to keep inactive tabs/toggles from loading until they are called upon? I think the reason for the slow load times is because the page is requesting hundreds of images at once when it loads, but it only needs to request the active gallery.
Any advice would be great.June 5, 2017 at 4:38 am #46557This reply has been marked as private.June 5, 2017 at 4:53 am #46558This reply has been marked as private.June 5, 2017 at 12:43 pm #46559
This isn’t really a theme related question, but I can give you some very basic guidance. The long load times are almost guaranteed to be the massive amount of images. There’s little point in lazy loading the actual content (HTML) as this isn’t data intensive, so focusing on the images is your best bet.
My personal opinion is that you’re going to have a difficult time with this method either way due to how lazy loading works and separating these into pages will make your life a lot easier. Either you’re loading a bunch of images at once because they’re detected in the viewport all at once or they aren’t detected and don’t load properly. Depending on the number of images you need to load at once and your tolerance for wait times, I would either write a custom script to:
a. Lazy load images on tab click.
b. Or AJAX the content on tab click.
The first is probably going to be a bit easier overall, but with either of these methods, you’ll probably want to add a loading icon of some type to the tab area as the images load.
You must be logged in to reply to this topic.