How to display the rendered entity of the "compact" display of the user account in the profile? I have a site with Drupal 8 and I want to customize the templates of my pages.

I use the Profile module.

How to display the rendered entity of the "compact" display of the user account in the profile ? 

This is the template to customize the profile page. 

{#
/**
 * @file
 *
 * Default theme implementation for profiles.
 *
 * Available variables:
 * - content: Items for the content of the profile.
 *   Use 'content' to print them all, or print a subset such as
 *   'content.title'. Use the following code to exclude the
 *   printing of a given child element:
 *   @code
 *   {{ content|without('title') }}
 *   @endcode
 * - attributes: HTML attributes for the wrapper.
 * - profile: The profile object.
 * - url: The profile URL, if available.
 *
 * @ingroup themeable
 */
#}
&lt;div{{ attributes.addClass('profile--personnel--teaser') }}&gt;

  &lt;div class="views-row"&gt;

      {{ ??? RENDERED ENTITY USER COMPACT ??? }}

  &lt;/div&gt;

&lt;/div&gt;


UPDATE

&lt;div{{ attributes.addClass('profile--personnel--teaser') }}&gt;

  &lt;div class="row"&gt;

    &lt;div class="bs-field-type"&gt;
      {{ profile.type.entity.label }}
    &lt;/div&gt;

    &lt;div class="bs-field-image"&gt;
      {{ drupal_entity('user', profile.uid.target_id, 'compact') }}
    &lt;/div&gt;

    &lt;h3 class="bs-field-title"&gt;
      {{ profile.getOwner().name.value }}
    &lt;/h3&gt;

    &lt;div class="bs-field-status"&gt;
    &lt;/div&gt;

    &lt;div class="bs-field-sex"&gt;
      {{ content.field_personnel_sexe }}
    &lt;/div&gt;

    &lt;div class="bs-field-age"&gt;
      {{ content.field_personnel_naissance }}
    &lt;/div&gt;

    &lt;div class="bs-field-address"&gt;
      {{ content.field_personnel_adresse }}
    &lt;/div&gt;

    &lt;div class="bs-field-contact"&gt;
      &lt;a class="btn btn-success" href="/messenger#new"&gt;
        &lt;i class="fas fa-comment fa-lg"&gt;&lt;/i&gt; Envoyer un message
      &lt;/a&gt;
    &lt;/div&gt;

    &lt;div class="bs-field-more"&gt;
      Voir son profil
    &lt;/div&gt;

    &lt;div class="bs-field-link"&gt;
      &lt;a href="{{ url }}" title="{{ content.title.value }}"&gt;&lt;/a&gt;
    &lt;/div&gt;

  &lt;/div&gt;

&lt;/div&gt;
If I understand your question correctly, you want to change the view mode when a user's profile page is displayed. I recommend to put this kind of logic in a module, not in your theme. One way to do this, is by implementing the hook_entity_view_mode_alter(&amp;$view_mode, Drupal\Core\Entity\EntityInterface $entity, $context):

function YOUR_MODULE_entity_view_mode_alter(&amp;$view_mode, Drupal\Core\Entity\EntityInterface $entity, $context) {
  if ($entity-&gt;getEntityTypeId() == 'user') {
    $view_mode = 'compact';
  }
}