How to use variable value in twig file?
To get the base_url (path) you will need this in your THEMENAME.theme file 

function THEMENAME_preprocess_page(&amp;$variables) {
  global $base_url;
  $variables['base_path'] = $base_url;
}


Then it will be available in your twig template

But most of the times you will not need the full path to display an image 

You can try the following

{% set img_url = item.image.url ? item.image.url : '/'{{ directory }}'/images/default.png' %}