How to display latest posts with authors image

You could try something like this:

<?php
$args = array( 'category' => 12, 'post_type' =>  'post' ); 
$postslist = get_posts( $args );    
foreach ($postslist as $post) :  
setup_postdata($post); 
?>  
<h2><a href="https://wordpress.stackexchange.com/questions/318848/<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> 
<h4><?php the_author();?></h4> 
<?php 
the_excerpt(); 
echo get_avatar(get_the_author_meta());     
endforeach; 
?> 

In the example the category id is set to 12 – just replace it with the id of the category you want to use.

More info:
How to loop through posts: https://developer.wordpress.org/reference/functions/get_posts/#user-contributed-notes
How to get the author name: https://codex.wordpress.org/Function_Reference/the_author
How to get the author image: https://codex.wordpress.org/Function_Reference/get_avatar

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