Is there a way to check if a gallery is linked to an attachment page or to an image file via jQuery or WP filter?
I'm trying to add a lightbox to gallery image that is linked to image file. But I can't do it since there's no way to tell the difference between image linked to attachment page or image file in the html codes generated by WordPress.