Jump to content

7.1 background image lazy loading - how to stop it

Recommended Posts

Hi folks, in Squarespace 7.1 they've added a feature which loads the background image of a section only once you've scrolled to it. Generally, I really praise this move from Squarespace in order to make sites faster, but it is annoying when you reload a page you've already scrolled half-way down, and when you scroll up the images don't appear until the top of the screen is about 20% from the top of the image, so you're left with a blank area for the majority of the time scrolling through that section.

I used to be able to manipulate the imagesLoaded function in 7.0, but I don't know how to trigger Squarespace getting the image src in 7.1. 

Anyone know how to do this?

Thanks,

Andrew

Link to comment
  • 11 months later...

Hey, I thought I'd follow up with some more findings.

I think Squarespace might have fixed this issue I described because I don't notice the blank space when scrolling back up a website after a page refresh.

On a side not, it turns out you can use the Squarespace imageLoader function in 7.1, so you can control when Squarespace fetches an image file.

This has been very useful for a client's website that has a huge gallery with lots of images.  As you scroll down, Squarespace loads the image file as you get to it. So it momentarily displays a blank space followed by a glitchy (not-smooth) image reveal.  I've overwritten this to lazy-load the images 500px before they appear on screen, meaning the image has already loaded by the time you scroll to it, and the fade-in animation is nice and smooth.

I am going to develop this as a plugin because I think it's a really useful feature. Let me know if you'd be interested, thanks.

Andrew

Link to comment
  • 1 month later...
On 4/8/2021 at 9:25 PM, suzycollins said:

Andrew, I'd be interested in a plugin like this for my photography site because I have lots of images to share, but don't want to impede my page load time and also don't want it to look glitchy when the images load as you scroll. Thanks!

I see a developer coded this plugin. A few months ago, I used it on my friend site.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 4 weeks later...
19 hours ago, sonjacorbett said:

@tuanphanwhich plugin did you use on your friends site to lazy load image?  

 

@digitalfreelancer did you end up creating a plugin for lazy load?

I used this https://sqskits.com/plugins/lazy-loading-images-for-squarespace

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 3 weeks later...
11 hours ago, kaioshk said:

Hi @tuanphan! Did this plugin https://sqskits.com/plugins/lazy-loading-images-for-squarespace work on the blog posts ?

I use Squarespace 7.1 and lazy loading works there only on pages and works well. Unfortunately it doesn't work on blog posts so I'm looking for the code for it.

I'mt not sure. I haven't tried with blog posts. You try contacting plugin author

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.