Insert post’s category name into thumbnail string

As @belinus mentioned, you can assign multiple categories to a post, so you have to decide which one to pass to the_post_thumbnail().

One approach would be to use get_the_category(), which returns an array, then grabbing the first result from that function as your thumbnail size:

$categories    = get_the_category();
$thumbnail_cat = ! empty( $categories[0]->slug ) ? $categories[0]->slug : '';

the_post_thumbnail( $thumbnail_cat );

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