Open Image Thumbnail in a new page, while clicking on the link

You can pass post slug in the query string with your new page URL.

single-thumnail.php?post=slug

Fetched thumb image by post id and show.

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