Custom theme – how to link the image without posting it

By default an image belongs only to one post. Indeed that post is the parent post of the attachments (that are posts too). I think that the comment by TheDeadMedic is very good option because it is native to WordPress, but you can only link a post with one Featured Image. If you want to attach several files you can use the plugin WP Better Attachments (link).

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)