Theme path in javascript
You can attach the drupalSettings in any form / build / preprocess etc.

Something like : 

function HOOK_preprocess_html(&amp;$variables) {
 $variables['#attached']['drupalSettings']['path']['themeUrl'] = \Drupal::theme()-&gt;getActiveTheme()-&gt;getPath();
}