How to ensure that images in SharePoint document libraries are opened in lightbox page?

testUser 41 Reputation points
2023-09-25T07:08:27.5366667+00:00

I have two sites with the same configuration on SharePoint 2019 and SharePoint Online, which have the same document library that stores various types of files. The difference between the two sites is that in 2019, when images were opened, they were opened in the lightbox page, while in online, some document library images were directly displayed in the browser's URL, while others were opened in the lightbox page.
What settings can be used to ensure that images open in the lightbox page?
User's image

User's image

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2023-09-25T09:16:35.6533333+00:00

    Hi @testUser,

    Thank you for posting in this community.

    Per my knowledge, SharePoint Online does not have the ability to open images on a lightbox.aspx page. This is unique to SharePoint Server.

    Can you share the screenshots and URLs of your images that open as a lightbox page on SharePoint Online for me to see? Please be careful not to disclose your private information.

    The images that I have open in my SharePoint Online document library also have a lightbox-like feature, where clicking on the button in the upper right corner closes the image.

    User's image

    For images that do not open in lightbox mode, try the following things:

    1. Are other users facing the same problem? View through another computer or account.
    2. Whether all SharePoint libraries have the same problem? You could create a new SharePoint library to check.
    3. Check if the same issue occurs with other SharePoint site collections.
    4. You could try to clear browser cache then restart it.
    5. Try to use a different browser or your browser's InPrivate mode to see if the same problem occurs.
    6. You can create a Picture Library to store images (This app you can find it in classic experience). This Library is another type of library that is designed for photos and images. Please check if the image opens as a lightbox in this library.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2023-09-27T01:34:42.83+00:00

    Hi @testUser,

    Thank you for your reply.

    The official SharePoint documentation does not explicitly state that classic mode pages do not support lightboxes. But I tested it with my coworker and the classic mode doesn't open the image in the form of a lightbox. Only in modern mode there is a lightbox.

    You can see Lightbox.aspx in the image URL in SharePoint 2019, but there is no such page in SharePoint Online.

    User's image

    SharePoint Online and SharePoint 2019 are similar but different implementations in some details. Probably no other technology currently achieves this goal. If you want Microsoft to implement it in SharePoint Online classic experience, you can submit new idea on SharePoint Feedback portal.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.