Jump to content

Random Background Image on Home Page

Recommended Posts


I've searched the forum and the web for a solution, but nothing seems to work exactly as people want it to. What I'd like to do is have about 5 to 8 random images serve as a background image on my Home Page. I currently have a section on the page that has a background image loaded properly. I'd like this image to be swapped out randomly with other images as people visit my site.

See the attached image for how it looks with one image.

I know this is a somewhat redundant post, but if there is a real solution I'd love to know it. This has been asked for for at least six years. There's a result from 2017 but without a solution. Can we do this, people?  🙂


Screen Shot 2023-02-09 at 11.13.44 AM.png

Link to comment
  • 1 month later...
On 2/15/2023 at 4:12 PM, davecooperphoto said:

I'd love to see an implementation. My site is now live here: davecooperphoto.com. The landing page image is the one I'd like to randomize. Note that it is set as a background image in the main Section.

I see you managed this, looks great! I'm trying to do something similar, would you mind sharing how?

Link to comment

Thank you!

Tuanphan helped me get things sorted out, but basically I first added a gallery to the page, then bought and installed this plugin:


Then added code to the page: 

Add to Design > Custom CSS
body.homepage article section:first-child {
    padding-top: 0px !important;

There were a few more tweaks I had to do to get the navigation to appear properly. I went back and forth with him via email to sort things out. 

Good luck!

Link to comment

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.