# How To Open Different Lightbox Gallery For Each Image In Gallery Block
**Source:** https://beyondspace.studio/blog/how-to-open-different-lightbox-gallery-for-each-image-in-gallery-block
**Language:** French (France)

---

# How to open different lightbox gallery for each image in Gallery block

Lightbox Studio

Nov 21

Written By Beyondspace

In a Squarespace Gallery block, clicking an image usually opens a lightbox gallery displaying all images together. In this tutorial, we’ll guide you through creating a grid gallery where each image opens its own unique lightbox gallery. This approach lets each image in your grid showcase a distinct set of media, offering a more dynamic and customized viewer experience.

Using lightboxify URLs, you’ll learn how to transform your galleries into this enhanced format, where each image links to a separate lightbox gallery.

## Step-by-Step Guide

### 1. Create the Source Gallery:

1.1 Create a new page,

Create the source gallery page

1.2 Name it properly, for example: **/source-gallery**

Name the page

1.3 Insert Gallery blocks

Insert Gallery block

### 2. Create the Lightboxify URL

2.1 Use Chrome extension to grab the ID of the Gallery blocks

Create lightboxify URL

2.2 The Lightboxify will look like this: */source-gallery?lightboxify=true#block-yui\_3\_17\_2\_1\_1716134815539\_3510*

- Source gallery page: **/source-gallery**
- Lightboxify url parameter: **?lightboxify=true**
- Target block ID: **#block-yui\_3\_17\_2\_1\_1716134815539\_3510**

**Note to readers**: You can either use Gallery block or Gallery section as Source gallery. If the Gallery ID isn’t available in the URL, Lightbox Studio will automatically use the first gallery block or section of the page.

### 3. Insert the Lightboxify URL to gallery

In this specific tutorial we will insert the URL to a Gallery block, other gallery layout will have different ways to append URLs to images

3.1 Open the page where you want to put the dynamic lightbox, for example: /home

Edit the page

3.2 Start editting the Gallery in page you opened

Edit the gallery

3.3 Edit image clickthrough

Save the edit

3.4 Put in the Lightboxify URL to the link input, then Save. Your gallery will looks like this

Different lightbox gallery created

### 4: Save and preview

Continue creating source gallery pages and insert links to the Gallery block until you're finished. Upon saving and previewing, when clicking on the grid gallery images, different lightbox galleries will open separately, each with its own set of media.

**Important:** The gallery lightboxify URLs will not work if you have enabled the lightbox option for the gallery, so ensure the lightbox option is turned off.

### Other layout support

This method works with all Squarespace gallery blocks, including the following layouts:

- **Grid layout**
- **Slideshow layout**
- **Carousel (Slider) layout**
- **Stack layout**

Below is the demostration video where each slide in a Grid gallery block is opening a seperate gallery when click, including the image itself

## Frequently Asked Questions (FAQs)

I can not insert a Gallery block on my 7.1 website?

If you're unable to insert a Gallery block on your Squarespace 7.1 website, you can use the Classic Gallert block plugin to overcome this limitation. Here’s how to do it:

1. **Install the Classic Gallery Block Plugin**:

   - Activate Classic Gallery block using Contrôle au sol
2. **Insert the Gallery Block**:

   - Une fois activé, vous verrez le **Bloc Galerie** option lors de l'insertion d'un nouveau bloc dans vos sections.
   - You can now add and customize gallery blocks on any page section in Squarespace 7.1.

For more detailed guidance, you can check out the full article on how to insert Gallery blocks here.

Lire la suite →

How to open a different lightbox gallery upon clicking the buttons?

To open a different lightbox gallery when clicking on buttons in Squarespace, you can use the Lightboxify URLs feature. Here’s how to set it up:

1. **Create a Source Gallery**

   - Insert a Gallery block or section a page (e.g., /source-gallery)
2. **Create the Lightboxify URL**

   - Your Lightboxify URL should look like this:  
     /source-gallery?lightboxify=true&lightboxify-mode=gallery#gallery-id
3. **Set Up the Button**

   - Create a Button block & Link the button to the Lightboxify URL you created.

For more detailed instructions, you can visit the How to open a gallery lightbox on button click page.

Lire la suite →

Will Lightboxify URLs slow down my website?

No, using Lightboxify URLs will not slow down your website. In fact, it can improve performance because the images will be loaded asynchronously. If you have many Lightboxify galleries in your content, it's recommended to put all source galleries on the same page to optimize loading times. This approach helps maintain a fast and responsive user experience while allowing for high-quality image displays.

For more information, you can check the Elevating Dynamic Galleries with Lightboxify URLs page.

Lire la suite →

What kind of content is supported by Lightboxify URLs?

Lightboxify URLs support various types of content, including:

- **Galleries**: You can open seperate lightbox gallery when clicking on different images, buttons or links
- **Videos**: Lightboxify URLs can be used to create video lightbox galleries. For more details, check out the tutorial on creating video lightbox galleries.
- **PDFs**: You can embed PDFs in a lightbox using Lightboxify URLs. For guidance, refer to the tutorial on embedding PDFs on Squarespace.
- **Alternate Images**: You can open alternate images in a lightbox by using Lightboxify URLs. More information can be found in the tutorial on opening alternate lightbox images.

Lire la suite →

Does each source gallery need to be on a separate page?

No, each source gallery does not need to be on a separate page. You can put all separate source galleries on a single page and link to them using their Section IDs or Section Anchor IDs (if you use a Gallery section) or Block IDs (if you use a Gallery block). For more details, you can refer to this post about IDs configuration.

Lire la suite →

Can I use Lightboxify URLs in a lightbox-enabled gallery?

No, currently you cannot use Lightboxify URLs in a gallery that has the lightbox feature enabled. If you include Lightboxify URLs in a lightbox-enabled gallery, they will be treated as normal links. For more information, you can refer to the Lightboxify URLs FAQ.

Lire la suite →

Beyondspace 

As a Squarespace Circle member, Beyondspace delivers plugins that elevate your website, streamline workflows, and optimize the Editor experience—saving time and driving engagement.

https://beyondspace.studio

Précédent

Précédent

## Embedding AI Chatbots into Your Squarespace Website

Suivant

Suivant

## Showcase Projects with unique lightbox galleries in Squarespace