You are missing a echo
and the $title
. It should be like this:
<?php echo $args['before_widget'] . $args['before_title']; ?> <img src="https://wordpress.stackexchange.com/questions/292262/<?php echo $image; ?>"></img> <?php echo $title . $args['after_title']; ?>