sachinchoolur / lightGallery

A customizable, modular, responsive, lightbox gallery plugin.
https://www.lightgalleryjs.com/
Other
6.55k stars 1.29k forks source link

Black screen image not showing #1633

Closed Steveb599 closed 3 months ago

Steveb599 commented 6 months ago

Description

When clicking on image it does not show the image itself only a black screen overlay.

image


    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/2.7.2/css/lightgallery.min.css" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/2.7.2/css/lg-thumbnail.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/2.7.2/css/lg-autoplay.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/2.7.2/lightgallery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/2.7.2/plugins/share/lg-share.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/2.7.2/plugins/thumbnail/lg-thumbnail.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/2.7.2/plugins/autoplay/lg-autoplay.min.js"></script>

    <script>
      let gallery = document.getElementById("gallery1");
      lightGallery(gallery, {        
        controls: false,
        speed: 200,
        download: false,
        counter: false,
        licenseKey: "0000-0000-000-0000",
        plugins: [ lgThumbnail, lgAutoplay],
      })
    </script>

Sample HTML markup

       <div class="gallery1" id="gallery1">
        <a href="assets/images/events/IMG_2464.JPG" 
          >
          <img src="assets/images/events/IMG_2475.JPG" alt="">
        </a>

        <a href="assets/images/events/IMG_4713.JPG">
          <img src="assets/images/events/IMG_4713.JPG" alt="">
        </a>
        <a href="assets/images/events/IMG_4713.JPG">
          <img src="assets/images/events/IMG_4713.JPG" alt="">
        </a>
        <a href="assets/images/events/IMG_4713.JPG">
          <img src="assets/images/events/IMG_4713.JPG" alt="">
        </a>

       </div>

Environment

Additional context

Steveb599 commented 5 months ago

Found the issue. the library does not suuport RTL, the html file is rtl.

adding css property

.lg-container{
  direction: ltr;
}

fixed the issue

stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.