Lightbox for Kirby Editor Gallery Block

I am trying to open the images from the kirby editor gallery block in a lightbox.


        <div class="k-editor-gallery-image-wrapper" style="<?= $imageStyle ?>">  
          <a href="<?= $image->url() ?>" data-fancybox="gallery">  
              <img class="k-editor-gallery-image <?= $image['imageClass'] ?>" srcset="<?= $image['image']->srcset([500, 1000, 1500]) ?>" sizes="(max-width: 640px) 500px, (max-width: 1200px) 1000px, 1500px" itemprop="thumbnail" alt="<?= $image['altText'] ?>" />

I tried to link the img tag. This doesn’t work. What should I do?


From looking at the example snippet, I’d say it should be $image['image']->url().

Thx. Now it works.
Great as always :slight_smile: