When lightbox enabled, all image URLs ending with .jpg (etc.) open in lightbox

Hello, I’m working on an art history textbook that has a lot of image URLs. When I embed the image that I want to show on the page (i.e., in a tag) I want the link to open the image in the lightbox (this image is always on the same domain). But when I link to a website that is the source for an image (i.e., a <a href= ), I want to simply link to that page (not on the same domain). For example: File:Honore Daumier The Uprising.jpg - Wikimedia Commons

Could the Lightbox feature be made more specific so it only opens images on the same domain? Or maybe we could enable Lightbox on individual images instead of globally? I cannot link to the Wikimedia Commons page above if I enable Lightbox for my book images.

Or is there a class or data attribute I could add to the images I don’t want to open in Lightbox?