Only display profile edit button on personal profile page I'm using the profile module and am trying to display a profile edit button on your personal profile page. 

my profile.html.twig: 

&lt;div class="m-section__content a-container"&gt;
{% if is_current_user %}
  &lt;div class="a-container u-margin-bottom"&gt;
    &lt;div class="a-cta "&gt;
      &lt;a class="a-cta__container" href="{{ url }}/edit"&gt;
        &lt;span class="icon-arrow-right a-cta__icon"&gt;&lt;/span&gt;
        &lt;span class="a-cta__text"&gt;{{ "Edit profile"|t }}&lt;/span&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  {% endif %}
  &lt;div class="u-grid u-grid--with-margins"&gt;
    &lt;div class="u-grid__col-7-12"&gt;
      &lt;table class="m-table"&gt;
        &lt;tbody&gt;
          &lt;tr&gt;
          {{ content|without('field_image', 'field_extra', 'field_tags') }}
          &lt;/tr&gt;
        &lt;/tbody&gt;
      &lt;/table&gt;
      &lt;p&gt;{{ content.field_extra }}&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="u-grid__col-5-12"&gt;
      {{ content.field_image }}
      {{ content.field_tags }}
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


The a-container div may only be displayed if the current user id is equals to the user id of the user linked to the profile that's being displayed.

I'd like to make this check in a preprocess function and return a bool 'is_current_user' to profile.html.twig but I'm stuggling to find the right hook for the profile page. 

I'm on drupal 8.7.1.

Thanks in advance!
Found the answer in access the user associated with a profile.

It was simply THEME_preprocess_profile.