Dynamic background image used in css after selector

There is a way to do it. Just include that CSS inside header before wp_head() with internal css. And then add the Source using PHP like below

<style>
.about-img:after {
   background-image: url(<?php bloginfo('template_directory')?>/img/tola.jpeg);
}

</style>

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