{% set apiUrl =
  path('aa_admin_media_library_endpoint', {
    _admin_locale: app.request.get('_admin_locale'|default(app.request.get('_locale')))
  })|trim('/', 'right')
%}
<div class="media-library"
     id="media-library-app"
     data-api-url="{{ apiUrl }}"
>
  <library ref="library"></library>
</div>