Render node author profile image in node template I am working on customization Node template file in Drupal 8, I added another field to user in admin/config/people/accounts/fields ( my field is field_bio). Now I want to render author image( with specified image style) and field_bio in node template`.

How can I achieve this?
If you like to do this in ui with one line of code:

1) add a view mode for user and name it "nodeview":


  /admin/structure/display-modes/view/add/user


2) activate the new view mode "nodeview" at the bottom of this page in "Custom Display Settings", then you get a new tab for the view mode "nodeview". Configure which fields are displayed and how they are formatted:


  /admin/config/people/accounts/display


3) Use the new view mode to render the author of the node in node preprocess:

$variables['author'] = \Drupal::entityTypeManager()-&gt;getViewBuilder('user')-&gt;view($variables['node']-&gt;getOwner(), 'nodeview');


4) Put the variable in twig

{{ author }}


This method allows full customization in ui and it is fast, because the rendered author gets cached and will be reused in every node referenced.