When "Link to" is set to "None" in Gallery Settings, display the image without a link.

BUGFIX: at the moment, gallery images are always displayed with links. (it looks like wp_get_attachment_link() was accidentally used instead of wp_get_attachment_image()).