How to Get Base, Media, Skin & Link URL in Magento2?

  • author-img Nidhi Arora
  • 5 years
How-to-get-base-URL-in-Magento2.jpg May 2, 2016 128 kB 1024 × 600 Edit Image Delete Permanently URL Title How-to-get-base-URL-in-Magento2 Caption
image_pdfPrintimage_printSave as PDF
It is different to get a URL in Magento 2 while comparing it with Magento 1.x. In Magento 1.x, Mage::getBaseUrl() is used to get the base URL. However, Magento 2 supports different methods to get the base, media, skin and link URL. Here is the blog that is going to make clear how you can get the URL in Magento 2.0:

1) To Get Base URL:-



2) To Get Url for Link:-


3) To Get Media Base Url:-


4) To Get Skin URl:-


For admin interface:-

{{view url=''}}


Free Webinar

Join us for a FREE webinar