How to use links with lightbox2

Hey I’m having a hard time getting lightbox2 from https://github.com/lokesh/lightbox2 to work on a jekyll site. The behavior should be that when I click on a link it should stay on the photography page and show the lightbox right. But instead it brings me to -> localhost:4000/assets/uploads/cuba-2-1370.jpg

So obviously I am missing something about how links work in jekyll but the stuff I find online is only about permalinks in relation with pages and posts, not with internal links or something which I need here right ?


layout: default
title: Photography
permalink: /photography/
---

<section class="page-heading">
  <div class="container">
    <p class="section-title">
      {{ page.title | upcase }}
    </p>
  </div>
</section>

<section class="photography">
  <div class="container">
    <div class="photography-flex-row" id="photo-list">
      {% assign sorted = site.photography | sort: 'date' | reverse %}
      {% for item in sorted %}
      <div class="photography-flex-item photography-item">
        <a href="/assets/uploads/{{ item.img | append: '-1370' }}.jpg" data-lightbox="mygallery">
          <picture>
            <source srcset="/assets/uploads/{{ item.img }}.webp" type="image/webp" alt="{{ item.alt }}">
            <img src="/assets/uploads/{{ item.img }}.jpg" class="img-fluid" alt="{{ item.alt }}">
          </picture>
        </a>
      </div>
      {% endfor %}
    </div>
  </div>
</section>
</div>

Oeps I used the slim version of jquery but lightbox doesn’t work with that. It works now!