CMS Lightbox picks the media between main project image or a video

Hi guys,

So in the work page there are 3 tabs containing CMS content from work and the 3 categories are ALL, VIDEOS and IMAGES. Im using lightboxes and for all i need the light box to pull the media from projects. However the issue is that the media only open either photos or videos i need it to be able to recognize if the lightbox has a video link it should open the video and if not it should open the main image. Any input helps !


Here is my public share link: https://preview.webflow.com/preview/qube-studios?utm_medium=preview_link&utm_source=designer&utm_content=qube-studios&preview=8f632ddaca4f8c3b53c59d980e087b0f&pageId=5fb9ac61cdd2921808791b58&mode=preview