What cause my 404 error for my user_picture thumbnail in template file?
In hook_preprocess_html() add the following code.

  $user = user_load(\Drupal::currentUser()-&gt;id());;
  $variables['user_pic'] = $user-&gt;user_picture-&gt;entity-&gt;uri-&gt;value;


In your template file use code similar to the following one.

 &lt;img width="62" height="62" class="image-responsive img-circle" src="{{ file_url(user.pic) }}" /&gt;


If you want to apply an image style, use the following code in hook_preprocess_html().

$variables['user_pic'] = ImageStyle::load('thumbnail')-&gt;buildUrl($user-&gt;get('user_pic‌​ture')-&gt;entity-&gt;uri-‌​&gt;value);


In the template file, use the following.

 &lt;img src="{{ user.pic }}" /&gt;