Setting images to open in a Lightbox

Enable lightbox effects to open images in an overlay with a dimmed background.

Last updated January 28, 2025

A lightbox is a design effect that opens an image in a centered overlay and dims the rest of the page when an image is clicked. Clicking the x in the top corner closes it and returns to the page. Lightboxes are a great way to highlight and enlarge images for visitors who want to get a closer look.

Watch a video

Before you begin

Change the lightbox background color

For gallery sections on version 7.1, you can style your lightbox to any color in the Section Themes editor.

In most other cases, you can choose a Dark or Light overlay for the lightbox in the block settings or site styles. For more specifics, see the sections on image blocks, gallery blocks, and gallery pages.

Gallery sections in grid layouts on version 7.1 have a lightbox option in section styles. To enable the lightbox:

  1. Click Edit on the page, then hover over the gallery section and click the pencil icon.
  2. Ensure the Gallery type is set to Grid: Simple, Grid: Strips, or Grid: Masonry. Slideshow layouts don't support a lightbox feature.
  3. Switch the Lightbox toggle on.
  4. Click Save to save your changes and keep editing, or Exit then Save to close the editor.

To style the lightbox color:

  1. While editing a page, open Site styles, then click Colors.
  2. Hover over the theme that matches your gallery section and click the pencil icon.
  3. Under the Galleries section, use the Lightbox background tweak to pick a lightbox color.
  4. To change the color of your lightbox navigation controls, use the Lightbox icon tweak.
  5. Click Save to save your changes and keep editing, or Exit then Save to close the editor.

Keep in mind:

  • Caption text doesn't display in the gallery section lightbox.
  • If you add clickthrough URLs to images then turn on a lightbox, clicking the image goes to the URL. The lightbox won't open.

Image blocks

Image blocks support a lightbox when:

To enable a lightbox:

  1. Add an image block, or double-click an existing image block to open the image editor.
  2. Click the Design tab.
  3. If your block has a layout option, ensure it's set to Inline. Other layouts don't support a lightbox.
  4. Switch the Lightbox toggle on.
  5. Choose between Dark Overlay and Light Overlay for your lightbox style with the Lightbox Theme drop-down.

Keep in mind:

  • Captions always display when you hover over a lightbox image, regardless of which caption display option you choose. On mobile, they display when you tap the dot icon.
    • Image blocks added to Fluid Engine sections don't support image captions. You can use a text block to add text adjacent to or overlaying an image block instead. This text won't display in the lightbox. 
  • It's not possible to enable a lightbox if you add a clickthrough URL.
  • To keep lightboxes enabled and link images, add a text link to the image's description. For image blocks, certain layouts also support buttons.

After adding your images to a grid gallery block, click the Design tab and check Lightbox. Set your lightbox slideshow style by choosing Dark Overlay or Light Overlay from the drop-down.

Keep in mind:

  • Captions always display when you hover over a lightbox image. On mobile, they display when you tap the dot icon.
  • Slideshow, carousel, and stack gallery blocks don't support a lightbox.
  • If you add clickthrough URLs and enable a lightbox, clicking the image opens the lightbox instead of the URL.
  • For videos to open in a lightbox, ensure you toggle on Use Thumbnail in your item's settings.

Summary blocks

When a wall or grid summary block is connected to a gallery page, the images automatically open in a lightbox slideshow. The summary block lightbox color is always Dark. Captions display on hover.

The lightbox slideshow affects clickthrough URLs:

  • While viewing the page, images with clickthrough URLs open the clickthrough link when clicked, rather than opening the lightbox slideshow.
  • When the lightbox slideshow is open, clickthrough URLs are disabled.

Tip

In version 7.0 sites that support a lightbox, you can enable videos added to gallery pages to open in lightboxes in summary blocks. To enable this, toggle on Video Thumbnail in the item settings for videos in your gallery page. If you don't enable this or if your template doesn't support a lightbox, your videos play in the summary block without opening in a lightbox.

Some templates' gallery pages on version 7.0 support a lightbox feature. For standard gallery pages, you can set the lightbox color to Light or Dark in site styles. Video descriptions don't display in the lightbox.

To learn how lightbox options work in these template families, see the table below.

Template family Lightbox options
Adirondack
  • Gallery page set to Grid
  • Image captions display on hover
Avenue
  • No lightbox

Aviator

  • Gallery page set to Grid
  • Clickthrough URLs disable a lightbox
  • Image captions display on hover

Bedford

  • Gallery page set to Grid
  • Clickthrough URLs disable a lightbox
  • Image captions display on hover

Brine

  • Gallery page set to Grid
  • Clickthrough URLs disable a lightbox
  • Image captions display on hover
  • Supported on gallery index page sections for videos only. Tip: Clicking a link in the video's caption opens the lightbox, not the link.

Farro

  • Gallery page set to Grid
  • Clickthrough URLs disable a lightbox
  • Image captions display on hover
Five
  • Gallery page set to Grid
  • Clickthrough URLs disable a lightbox
  • Image captions display on hover
Flatiron
  • No lightbox
Forte
  • Click + icon in top-right corner of image to open a lightbox
  • Disabled for index page
  • Captions don't display
Galapagos
  • Gallery page set to Grid
  • Clickthrough URLs disable a lightbox
  • Image captions display on hover
Ishimoto
  • No lightbox
Momentum
  • No lightbox

Montauk

  • No lightbox
Native
  • Gallery page set to Grid
  • Clickthrough URLs disable a lightbox
  • Image captions display on hover

Pacific

  • Gallery page set to Grid
  • Clickthrough URLs disable a lightbox
  • Image captions display on hover
  • Supported on grid gallery index page sections

Skye

  • Gallery page set to Grid
  • Clickthrough URLs disable a lightbox
  • Disabled for index page
  • Image captions display on hover
Supply
  • No lightbox

Tremont

  • No lightbox
Wells
  • No lightbox
Wexley
  • Click any image to open a lightbox slideshow
  • Lightbox is disabled on mobile
  • Captions don't display

York

  • Gallery page set to Grid
  • Clickthrough URLs disable a lightbox
  • Image captions display on hover
Footer Image
  • Get help from our community

  • Get help from our community on advanced customizations.

  • Hire a Squarespace Expert

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