I'm creating a Drupal 8 theme. I have overriden the menu.html.twig... and I need to add an image to the first menu item.
In the page.html.twig I have used {{ base_path ~ directory }}
to get the url of image like this:
<img class="logo_inder" src="{{ base_path ~ directory }}/img/logo-inder.png" />
But I'm trying to insert an image in themes/(my_theme)/templates/menu.html.twig like this:
<img src="{{ base_path ~ directory }}/img/inicio-icono.png" />
But is in this file, I can't print these variables:
{{ directory }}
{{ base_path }}
or
{{ base_path ~ directory }}
How can I print the base URL for use in my image?