Add a new data attribute in tag

I found the solution to add that attribute to the img tag with this function:

add_filter('the_content','new_content');
function new_content($content) {
    $content = str_replace('<img','<img data-qazy="true"', $content);
    return $content;
}

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