fix image thumb lightboxes
one more for subfolders
fixes #302 more refactoring