link the attachment to the permalink