Best Way Of Getting Base URL Inside KnockoutJS .html File
Answer : I managed to do this in app/design/frontend/<Vendor>/<Theme>/Magento_OfflinePayments/web/template/<Filename>.html , but the solution should work in the Magento_Checkout as well. When you inspect the window variable in the dev-console of your browser, you will see that the checkout and checkoutConfig objects are available on checkout-pages. Here are the relevant parts: checkout.baseUrl checkout.checkoutUrl checkout.customerLoginUrl checkout.removeItemUrl checkout.shoppingCartUrl checkout.updateItemQtyUrl checkoutConfig.cartUrl checkoutConfig.checkoutUrl checkoutConfig.defaultSuccessPageUrl checkoutConfig.forgotPasswordUrl checkoutConfig.pageNotFoundUrl checkoutConfig.registerUrl checkoutConfig.staticBaseUrl In my case, I wanted to display an image; here's the code: <img data-bind="attr: {'src':checkoutConfig.staticBaseUrl + 'frontend/<Vendor>/<Theme>/<Locale>/images/logo.png'}" alt="...