Others

Can You Disable the SharePoint Image Web Part Lightbox?

John WilsonJohn Wilson Oct 29, 2026 868 views

Question details

The user wants to know if there is a way to stop the lightbox from automatically opening when an image is clicked in the modern SharePoint Image Web Part.

Can You Disable the SharePoint Image Web Part Lightbox?
Product
SharePoint
Device & OS
not provided
Scenario
Displaying static images on a modern SharePoint page without triggering the full-screen lightbox overlay upon clicking.
Observed behavior
Clicking an image in the Image Web Part or Image Gallery Web Part automatically opens it in a lightbox view, and there is no native toggle to turn this behavior off.
Before you start

Verify your SharePoint site permissions to ensure you have edit access to modify page web parts, and note that the native Image Web Part currently lacks a toggle to disable the lightbox feature.

Solution 1Recommended

Use the File Viewer Web Part as a Workaround

Since the native Image Web Part forces the lightbox, you can use the File Viewer Web Part to embed images on your page without triggering the popup.

The modern SharePoint Image Web Part does not currently offer an option to disable the lightbox. The Image Gallery Web Part has the same limitation.

As an alternative, the File Viewer Web Part allows you to display a specific file on the page without the native image click-to-expand behavior.

1
Upload the Image

Upload the desired image to a standard SharePoint Document Library or your OneDrive.

2
Edit the Page

Navigate to your modern SharePoint page, click 'Edit' in the top right corner, and hover over the page canvas to click the '+' icon to add a new web part.

3
Add File Viewer Web Part

Search for 'File viewer' in the web part menu and select it to add it to your page.

4
Select the Image

Choose the image you previously uploaded to your Document Library or OneDrive to display it on the page, then republish the page.

Use the File Viewer Web Part as a Workaround
Source Location Limitation: The File Viewer Web Part may restrict file selection to standard Document Libraries or OneDrive. It generally does not allow you to pick images directly from the Site Assets library.
Free Microsoft Office alternative

Manage Your Documents Seamlessly with WPS Office

While dealing with SharePoint web part limitations can be frustrating, managing your daily documents doesn't have to be. WPS Office is a free, lightweight, and highly compatible alternative to Microsoft Office, offering an intuitive interface and seamless file management.

  1. 1. Download and Install: Download the free WPS Office installer from the official website and follow the setup wizard.
  2. 2. Open Your Files: Launch WPS Office and open your existing Word, Excel, or PowerPoint documents directly.
  3. 3. Edit and Save: Edit your documents with advanced tools and save them in standard Microsoft formats to upload to your SharePoint Document Library.
Highly compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx) for easy uploading to SharePoint.Lightweight design ensures fast loading and smooth editing, even on older computers.Familiar, user-friendly interface requiring zero learning curve for Microsoft Office users.Built-in PDF tools for effortless document conversion and sharing.
microsoft office alternative - wps office

Frequently Asked Questions

Does the SharePoint Image Gallery Web Part have a lightbox toggle?

No, the Image Gallery Web Part shares the exact same feature limitation as the standard Image Web Part. Images clicked in the gallery will automatically open in a lightbox, and there is no native setting to disable it.

Can I use images stored in Site Assets with the File Viewer Web Part workaround?

Typically, no. The File Viewer Web Part restricts file selection to standard Document Libraries or OneDrive, so images stored in the backend Site Assets folder might not be selectable.

Are there custom code solutions to disable the SharePoint lightbox?

Yes. While out-of-the-box settings do not allow it, developers can build custom web parts using the SharePoint Framework (SPFx) to render images exactly as desired without triggering the lightbox effect.