Skip to Content
Save 20% on our Theme Bundle $199 instead of $249
DocsAspectImage Lightbox

Image Lightbox

The Aspect theme comes with a built-in lightbox feature that enhances the viewing experience of images on your site. When enabled, users can click on images to view them in a fullscreen modal.

Default Behavior

By default, the lightbox feature is enabled for all images on your site. When a user clicks on an image, it opens in a fullscreen modal that allows for:

  • Zooming in and out of images
  • Viewing images in a distraction-free environment
  • Closing the lightbox by clicking on image, using the escape key or scrolling the page

Disabling Lightbox Globally

Code Injection is required to add custom JS.

If you prefer not to use the built-in lightbox feature, you can disable it by adding the following code snippet to your site’s Code Injection settings:

<script> window.pvs?.disableLightbox?.(); </script>

Enabling Lightbox for Specific Posts

In cases where you’ve disabled the lightbox globally but want to enable it for specific posts, you can use the internal tag system in Ghost:

  1. Log in to Ghost admin
  2. Go to Posts, and open the post
  3. Open the Post settings sidebar
  4. Add the #lightbox tag to Tags
  5. Click Publish

The lightbox will now be enabled on posts with the #lightbox internal tag, even if it’s disabled globally.

⚠️

Remember that internal tags starting with # are not visible to readers and are used only for theme features and integrations.

Disabling Lightbox for Specific Posts

If you prefer to disable the lightbox only for certain posts, you can use another internal tag:

  1. Log in to Ghost admin
  2. Go to Posts, and open the post
  3. Open the Post settings sidebar
  4. Add the #disable-lightbox tag to Tags
  5. Click Publish

The lightbox will now be disabled only on posts with the #disable-lightbox internal tag.

⚠️

Remember that internal tags starting with # are not visible to readers and are used only for theme features and integrations.